What is React Strict Mode?

Why Interviewers Ask This

This question tests conceptual clarity. Interviewers want to hear a precise, confident definition before moving to more complex React.js topics. It also reveals how well you can explain technical ideas to non-experts.

Answer

React Strict Mode is a development-mode tool that highlights potential problems in a React application. It renders components twice (in development) to detect side effects, and helps identify unsafe lifecycle usage, legacy API usage, and unexpected side effects. Enable it by wrapping your app: <React.StrictMode><App /></React.StrictMode>. What it does: (1) Renders components twice in development to detect impure rendering (unexpected side effects during render). (2) Runs effects twice in development to surface missing cleanup. (3) Warns about deprecated APIs (findDOMNode, legacy context, string refs). (4) Warns about using componentWillMount, componentWillReceiveProps, componentWillUpdate. Important: Strict Mode has NO effect in production — it only adds checks in development. The double-invocation behavior (render twice, effect twice) is intentional and can surprise developers who are not aware of it. If your app breaks in Strict Mode, it reveals a real bug that would occur in production anyway. Always develop with Strict Mode enabled.

Pro Tip

If you're unsure about a detail, say so honestly and explain your reasoning. Interviewers respect candidates who can think through uncertainty rather than bluffing.