React interview questions
Hooks behaviour (50 predict-the-render questions), rendering and Fiber internals, and state architecture with Context and Redux. 66 free questions in 6 topics, each with its answer and an explanation once you have tried it.
0 of 66 solved
Topics
- Hooks: useState & useEffect · Quizzes (17)
- Hooks: useRef, useMemo & useCallback · Quizzes (12)
- Hooks: useReducer & useContext · Quizzes (8)
- Hooks: layout, concurrent & rules · Quizzes (13)
- Rendering, reconciliation & Fiber · Quizzes (3), Coding drills (1), Flashcards (4), Put in order (1)
- Context, Redux & state architecture · Quizzes (3), Coding drills (2), Flashcards (2)
Hooks: useState & useEffect
0 / 17- Not attemptedThree setCount(count + 1) in one click
- Not attemptedFunctional updates chain
- Not attemptedMutating state and setting the same object
- Not attemptedLazy initializer runs once
- Not attemptedsetState inside setTimeout (React 18)
- Not attemptedLogging state right after setState
- Not attemptedLazy initializer captures the first value
- Not attemptedSetting the same value twice
- Not attemptedEffect with no dependency array
- Not attemptedEmpty dependency array: mount and unmount
- Not attemptedStale count inside setInterval
- Not attemptedsetInterval with a functional update
- Not attemptedParent re-render, same primitive dependency
- Not attemptedA derived boolean as a dependency
- Not attemptedInline callback as an effect dependency
- Not attemptedEvent listener reading stale state
- Not attemptedCleanup on unmount
Hooks: useRef, useMemo & useCallback
0 / 12- Not attemptedMutating a ref does not re-render
- Not attemptedPrevious value with a ref
- Not attemptedDOM ref inside an effect
- Not attemptedPlain variable vs ref with no re-render
- Not attemptedLatest value via ref in an interval
- Not attemptedRef persists across renders
- Not attempteduseMemo with a stable dependency
- Not attempteduseMemo with a new array each render
- Not attemptedReact.memo without useCallback
- Not attemptedReact.memo with useCallback
- Not attempteduseMemo vs useCallback return values
- Not attempteduseMemo with empty deps and Math.random
Hooks: useReducer & useContext
0 / 8- Not attemptedSequential dispatches compound
- Not attemptedReducer returns the same state
- Not attempteduseReducer lazy init
- Not attemptedDispatching an unknown action
- Not attemptedThree dispatches in one handler
- Not attemptedContext consumers re-render
- Not attemptedNested providers: innermost wins
- Not attempteduseContext with no provider and no default
Hooks: layout, concurrent & rules
0 / 13- Not attemptedRender vs useLayoutEffect vs useEffect order
- Not attemptedMeasuring the DOM before paint
- Not attemptedsetState inside useLayoutEffect
- Not attemptedWhat useTransition returns
- Not attemptedWhat useDeferredValue does
- Not attemptedUrgent vs transition updates
- Not attemptedDeferring an expensive child
- Not attempteduseId across instances
- Not attempteduseSyncExternalStore third argument
- Not attemptedWhy useSyncExternalStore exists
- Not attemptedConditionally calling a hook
- Not attemptedTwo instances of a custom hook
- Not attemptedStale closure in a delayed log
Rendering, reconciliation & Fiber
0 / 9- Not attemptedFrom setState to pixels
- Not attemptedRender phase vs commit phase
- Not attemptedWhat is Fiber?
- Not attemptedThe two trees
- Not attemptedWhy hooks must keep their order
- Not attemptedReconciliation and keys
- Not attemptedWhen useCallback helps
- Not attemptedWhat makes a component re-render?
- Not attemptedshallowEqual (React.memo's comparison)Difficulty: easy
Context, Redux & state architecture
0 / 7React interview questions: FAQ
- How many React interview questions are there?
- 66 questions in 6 topics: Quizzes (56), Coding drills (3), Flashcards (6), Put in order (1). All of them are free and need no login.
- What do the React questions cover?
- Hooks: useState & useEffect, Hooks: useRef, useMemo & useCallback, Hooks: useReducer & useContext, Hooks: layout, concurrent & rules, Rendering, reconciliation & Fiber and Context, Redux & state architecture.
- How should I practise React for a frontend interview?
- Go topic by topic and answer each question before you open its answer and explanation. Progress stays in your browser, so Review brings back the questions you missed, and a mock round mixes questions under a timer.