Skill Zuno · skillzunos.com · Fullstack
React interview questions
Prepare for React interviews on Skill Zuno. This practice book covers React interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.
Open React on Skill ZunoAlso see the React tutorial.
React is a JavaScript library for building user interfaces from components. Components describe the UI for a given state, and React updates the DOM efficiently when state changes. React interviews cover JSX, props and state, hooks, rendering and reconciliation, effects, context, performance and server components.
Sample React interview questions
Why do list items need a key?
Keys tell React which item is which between renders. With stable keys React moves existing elements and keeps their state when the list changes; using the array index breaks this when items are inserted or reordered.
When does the useEffect cleanup function run?
Before the effect runs again because its dependencies changed, and when the component unmounts. It removes subscriptions, timers and listeners so they do not leak or act on stale state.
What is the difference between useMemo and useCallback?
useMemo caches the result of a calculation; useCallback caches a function so it keeps the same identity between renders. Both only help when an expensive calculation or a memoised child depends on them.
Why should you not mutate state directly?
React compares the old and new state by reference. Mutating an object in place keeps the same reference, so React may skip the re-render. Create a new object or array instead.
What are React Server Components?
Server Components render only on the server and send their output to the client, so their code and dependencies never reach the bundle. They can read data directly; interactive parts are marked 'use client'.
What you can practice
- React interview questions for beginners and experienced developers
- Level-based practice: New, Easy, Medium, Hard, and Diff
- Fullstack topics alongside React on skillzunos.com