200 React interview questions and answers
React interview questions on components, state, rendering, reconciliation, context, performance, React 19 features and the patterns interviewers ask about most.
Easy100 easy React questions
- 1What is React?
- 2Why use React?
- 3What are components?
- 4Difference between Functional and Class components?
- 5What is JSX?
- 7What is the Virtual DOM?
- 10What is a key in React?
- 11Why are keys important?
- 12What are props?
- 13Difference between props and state?
- 14What is state?
- 15How to update state?
- 17What is setState()?
- 18What is 'lifting state up'?
- 19What is prop drilling?
- 20What is the component lifecycle?
- 22What is the render method?
- 23What is a Fragment?
- 24What is Strict Mode?
- 25What is a controlled component?
- 26What is an uncontrolled component?
- 28How to handle events in React?
- 30Difference between default and named exports?
- 31What is conditional rendering?
- 32What is list rendering?
- 33What is the children prop?
- 34What are default props?
- 35What are PropTypes?
- 36What is React DevTools?
- 37What is Create React App (CRA)?
- 38What is Vite?
- 39What is component composition?
- 40What is a reusable component?
- 41What are React Hooks?
- 42Why were Hooks introduced?
- 43What is useState?
- 44Can we use multiple state variables?
- 45What is useEffect?
- 46Equivalent of lifecycle methods in useEffect?
- 47What is the dependency array in useEffect?
- 48What is the cleanup function in useEffect?
- 49What is useContext?
- 50What is useRef?
- 51Difference between useRef and state?
- 54Difference: useMemo vs useCallback?
- 57What is a custom hook?
- 58What are the Rules of Hooks?
- 65What is useId?
- 72What is cleanup in hooks?
- 73What is a side effect?
- 76Why hooks cannot be conditional?
- 77Custom hook example?
- 80What is lazy initialization in useState?
- 81What is a state updater function?
- 82What is a functional update?
- 84What is a re-render?
- 85What triggers a re-render?
- 95What is lazy loading?
- 96What is code splitting?
- 98What is React.lazy?
- 100What is tree shaking?
- 102Smart vs Dumb components?
- 103Container vs Presentational?
- 104What is Atomic Design?
- 106What is global state?
- 107What is Context API?
- 109What is Redux?
- 111What is a Store?
- 112What is a Reducer?
- 113What is an Action?
- 114What is Dispatch?
- 118What is Zustand?
- 121What is React Router?
- 122What is dynamic routing?
- 123What is nested routing?
- 126What is navigation?
- 127What are params?
- 128What is a query string?
- 129What is useNavigate?
- 130What is useParams?
- 131Controlled vs Uncontrolled Forms?
- 133What is Formik?
- 134What is React Hook Form?
- 137Axios vs Fetch?
- 139Loading states?
- 142What is CSR (Client-Side Rendering)?
- 145What is Next.js?
- 146Why use Next.js?
- 148What are Client Components?
- 153What is Sanitization?
- 156What is Testing?
- 157What is Jest?
- 158What is React Testing Library?
- 159Unit vs Integration testing?
- 161How to debug a React app?
- 169Custom Hooks Pattern?
- 172Key issues in list?
- 173State not updating immediately?
- 181Build a counter app
- 189Accordion component
Medium91 medium React questions
- 6How does JSX work under the hood?
- 8How does React update the DOM?
- 9What is reconciliation?
- 16Is state update asynchronous?
- 21What are the common lifecycle methods in class components?
- 27How to handle forms in React?
- 29What is a Synthetic Event?
- 52What is useMemo?
- 53What is useCallback?
- 55When to use memoization?
- 56What is React.memo?
- 59What is useReducer?
- 60useReducer vs useState?
- 61What is useLayoutEffect?
- 62Difference: useEffect vs useLayoutEffect?
- 64What is forwardRef?
- 66What is useTransition?
- 67What is useDeferredValue?
- 68What is batching?
- 69What is a stale closure in hooks?
- 70How to avoid infinite loops in useEffect?
- 71What is a dependency warning?
- 74What is the render cycle?
- 75What is hook call order?
- 78How to share logic via hooks?
- 79Hook performance optimization?
- 83What is referential equality?
- 86What is batching in React 18?
- 87What is Strict Mode double render?
- 90What is a transition update?
- 91What is React performance optimization?
- 92What causes unnecessary re-renders?
- 93How to prevent re-renders?
- 94What is memoization in React?
- 97What is Suspense?
- 99Bundle size optimization?
- 101Folder structure best practice?
- 105What is scalable architecture?
- 108Context vs Redux?
- 110What is Redux Toolkit?
- 115What is Middleware in Redux?
- 116What is Redux Thunk?
- 119What is Recoil?
- 120When to use which state tool?
- 124What are protected routes?
- 125What are lazy routes?
- 132Form validation?
- 135Performance in forms?
- 136How to fetch data?
- 138Error handling in API?
- 140Caching strategies?
- 141What is SSR (Server-Side Rendering)?
- 143What is SSG (Static Site Generation)?
- 144What is Hydration?
- 147What are Server Components?
- 149What is Edge Rendering?
- 150What is Streaming?
- 151XSS in React?
- 152How React prevents XSS?
- 154What is CORS in React?
- 155Auth in React?
- 160Mocking APIs in tests?
- 162React DevTools Profiler?
- 163Why is a component re-rendering?
- 164How to trace performance issues?
- 165What are Error Boundaries?
- 166What is HOC (Higher-Order Component)?
- 167What are Render Props?
- 170Controlled Pattern?
- 171How to fix infinite re-render?
- 174Async bugs in React?
- 175What are memory leaks?
- 176Race conditions in fetching?
- 177Stale data issues?
- 178Debounce in React?
- 179Throttle in React?
- 180Cleanup issues?
- 182Build a todo app
- 183Search with debounce
- 185Pagination implementation
- 186Form validation logic
- 187Modal component
- 188Tabs component
- 190Dropdown menu
- 191Dark mode toggle
- 192API fetch + loader
- 193Error Boundary implementation
- 194Custom hook (useFetch)
- 195useLocalStorage hook
- 197Drag and drop basics
- 199Role-based routing