React Cheat Sheet 2026

The 30 highest-yield React facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

50 questions
60 min time limit
70% to pass
  1. What does the `defaultValue` prop do on a React input element? → Sets the initial value without making the input controlled
  2. Which of the following is a valid useEffect cleanup? → useEffect(() => { return () => clearInterval(id); })
  3. Which built-in hook pair is most commonly combined in a useFetch custom hook? → useState and useEffect
  4. In which phase does useEffect run relative to the browser paint? → After the browser has painted
  5. What is the purpose of the key prop when rendering a list? → Help React identify which items changed, added, or removed
  6. What does a custom hook typically return? → It can return anything: values, functions, arrays, objects, or nothing
  7. Why is over-using useMemo considered an anti-pattern? → Memoization itself has overhead; the benefit only justifies complex computations
  8. What does React not include? → All of the above
  9. What does the useState hook return? → An array with the state value and a setter function
  10. What is a useLocalStorage custom hook typically used for? → Persisting state to localStorage and syncing it with component state
  11. What does the useContext hook return? → The nearest Provider's value prop
  12. What is a React fragment? → A wrapper (<> or ) that groups multiple elements without adding extra DOM nodes
  13. Which hook lets you perform side effects in a function component? → useEffect
  14. To create UI elements, ReactJS does not require HTML or any HTML preprocessors. → False
  15. What is the correct way to update one property of an object stored in state? → setUser({...user, name: 'Alice'})
  16. How do you pass additional data along with a useReducer action? → Include a payload property in the action object
  17. What is component composition in React? → Building complex UIs by combining simpler components together, passing children and props
  18. What does the useState hook return? → An array with a state value and a setter function
  19. What must you create before using the useContext hook? → A context object with React.createContext
  20. Which pattern allows you to reset state back to its initial value cleanly? → Change the component's key prop
  21. In React, which store function is not used to configure the change listener? → None of the above
  22. What rule governs where Hooks can be called? → Only at the top level of a component or custom hook
  23. Where can a custom hook be called from? → Inside function components or other custom hooks
  24. What is a common mistake when including objects or arrays in useEffect dependencies? → A new reference is created on each render, causing infinite re-runs
  25. Can a custom hook call another custom hook? → Yes, hooks can call other hooks freely
  26. Can two components using the same custom hook share state? → No, each component gets its own isolated state instance
  27. What is useMemo used for? → Memoizing expensive computed values between renders
  28. What does the `autoComplete` prop on a React input element control? → Whether the browser offers autofill suggestions for the field
  29. What are React SyntheticEvents? → Cross-browser wrappers around native browser events
  30. What performance optimization prevents context consumers from re-rendering when unrelated state changes in the Provider? → Memoizing the context value with useMemo
Turn these facts into recall:

What Practice Test Geeks adds beyond an AI chat for React

An AI chatbot can quiz you, but it can't reproduce the exam conditions or keep your record. Here you get:

  • A timed, full-length React mock exam — 50 questions in 60 minutes with a 70% pass mark, modeled on the official exam's question count and time limit, followed by a score report broken down by exam domain.
  • A fixed React question bank: the same test every attempt, so your score is comparable from one try to the next instead of changing with every regenerated quiz.
  • Progress saved on your device: completed tests, scores and missed questions stay in My Progress, so you can retake only what you got wrong.
  • React flashcards built from the same question bank.
  • Free React practice tests with the correct answer shown after each question.
Start the Timed React Mock Exam →
Was this helpful?

Written and edited by , founder of Practice Test Geeks, with AI assistance. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Editorial policy