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
- What does the `defaultValue` prop do on a React input element? → Sets the initial value without making the input controlled
- Which of the following is a valid useEffect cleanup? → useEffect(() => { return () => clearInterval(id); })
- Which built-in hook pair is most commonly combined in a useFetch custom hook? → useState and useEffect
- In which phase does useEffect run relative to the browser paint? → After the browser has painted
- What is the purpose of the key prop when rendering a list? → Help React identify which items changed, added, or removed
- What does a custom hook typically return? → It can return anything: values, functions, arrays, objects, or nothing
- Why is over-using useMemo considered an anti-pattern? → Memoization itself has overhead; the benefit only justifies complex computations
- What does React not include? → All of the above
- What does the useState hook return? → An array with the state value and a setter function
- What is a useLocalStorage custom hook typically used for? → Persisting state to localStorage and syncing it with component state
- What does the useContext hook return? → The nearest Provider's value prop
- What is a React fragment? → A wrapper (<> or ) that groups multiple elements without adding extra DOM nodes
- Which hook lets you perform side effects in a function component? → useEffect
- To create UI elements, ReactJS does not require HTML or any HTML preprocessors. → False
- What is the correct way to update one property of an object stored in state? → setUser({...user, name: 'Alice'})
- How do you pass additional data along with a useReducer action? → Include a payload property in the action object
- What is component composition in React? → Building complex UIs by combining simpler components together, passing children and props
- What does the useState hook return? → An array with a state value and a setter function
- What must you create before using the useContext hook? → A context object with React.createContext
- Which pattern allows you to reset state back to its initial value cleanly? → Change the component's key prop
- In React, which store function is not used to configure the change listener? → None of the above
- What rule governs where Hooks can be called? → Only at the top level of a component or custom hook
- Where can a custom hook be called from? → Inside function components or other custom hooks
- 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
- Can a custom hook call another custom hook? → Yes, hooks can call other hooks freely
- Can two components using the same custom hook share state? → No, each component gets its own isolated state instance
- What is useMemo used for? → Memoizing expensive computed values between renders
- What does the `autoComplete` prop on a React input element control? → Whether the browser offers autofill suggestions for the field
- What are React SyntheticEvents? → Cross-browser wrappers around native browser events
- 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.
Was this helpful?
Written and edited by Nathan Beja, 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