What is React Strict Mode?

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.