Loading...
Loading...
Browse 5 real-world technical and behavioral interview questions about React. Review scenarios, edge cases, and architectural best practices.
Each must decide what to re-render when data changes, how derived values stay correct, and how a component gets a dependency it did not create. Angular answers with dirty checking now moving to signals plus a hierarchical injector, Vue with proxy-based per-property tracking, React with convention plus memoisation.
A React index key bug happens when list positions are used as identity. Deleting, sorting or filtering shifts positions, so React reuses the wrong component instance and local state appears beside the wrong row.
React Server Components differ from SSR because they keep server-only work out of the client bundle instead of only rendering HTML on the server. The migration works when the use client boundary stays low and data fetching stays on the server.
React.memo still re-renders when shallow prop comparison fails because parents recreate objects, callbacks or children, or when context and local state update. Stabilise references with useMemo/useCallback only where it removes real render cost.
React useEffect runs twice on mount in development when Strict Mode deliberately runs one extra setup-cleanup-setup cycle. It does not happen in production builds, and the fix is to write the cleanup the effect was missing rather than to guard the effect or remove Strict Mode.