React Study Guide 2026
Everything you need to pass the React exam in one place: the exam format, every topic to study, real practice questions with explanations, flashcards, and full-length practice tests. Free, no sign-up needed.
📋 React Exam Format at a Glance
📚 React Topics to Study (72)
✍️ Sample React Questions & Answers
1. What is the recommended way to update state based on the previous state in useState?
Passing a function like setCount(prev => prev + 1) guarantees you work with the latest state value.
2. How can useRef help avoid stale closures in event handlers?
Storing the current value in a ref lets an event handler read the latest value without being recreated on every render.
3. Which of the following is NOT a rule for React Hooks?
React Hooks are specifically designed to be used exclusively within React function components. They cannot be called inside class components, as class components manage state and side effects using `this.state` and lifecycle methods. This fundamental rule ensures that Hooks provide a consistent and predictable way to use React features without the complexities of classes.
4. How does React determine which useState call corresponds to which state variable across renders?
React tracks hooks by their call order, which is why hooks must always be called in the same order.
5. What is a trailing stop order?
Trailing stops move with the price in a favorable direction but stay fixed when the price moves against you, automatically locking in gains.
6. What naming convention must all custom hooks follow?
Custom hooks must start with 'use' so React's linter can enforce the Rules of Hooks for them.