React Quiz
Eight quick questions on React 19 fundamentals, hooks, and Server Components.
Sample questions
EXAMPLE
# React quiz 1) Keys in a list are for: a) accessibility b) helping React match items across renders c) ordering d) SEO 2) useState updater function is best for: a) batching multiple updates that depend on previous state b) async actions c) effects d) replacing useReducer 3) useEffect dependencies should include: a) every value used inside the effect that comes from props or state b) only props c) nothing for one-time effects d) the JSX 4) Server Components can: a) use useState b) fetch data and render JSX, but cannot use state or browser APIs c) replace client components entirely d) only render on the client 5) The right way to derive state is: a) useEffect to sync into useState b) compute it during render (or with useMemo if expensive) c) put it in context d) refs 6) useTransition is for: a) animation b) marking state updates as non-urgent so urgent ones can interrupt c) router navigation only d) Suspense fallbacks 7) React 19 useOptimistic is for: a) skipping reconciliation b) showing optimistic UI during a pending async action c) caching d) memoisation 8) Memoise everything? a) yes b) no - measure first; default React is fast; useMemo / useCallback are scalpels not hammers c) only with React Compiler d) only in production Answers: 1b, 2a, 3a, 4b, 5b, 6b, 7b, 8b.
Why it matters
Keys, dependencies, derived state, and selective memoisation are the four things that distinguish junior from senior React. Get those reflexes right and most code reviews stop being about React-specific issues.
Tip: Tweak the snippet with Try it Yourself », then sit the quiz at the bottom of the page.
Discussion
Loading…