FrontendDeveloper.in

React question detail

What is the benefit of strict mode?

The <StrictMode> will be helpful in the below cases,

  1. To find the bugs caused by impure rendering where the components will re-render twice.
  2. To find the bugs caused by missing cleanup of effects where the components will re-run effects one more extra time.
  3. Identifying components with unsafe lifecycle methods.
  4. Warning about legacy string ref API usage.
  5. Detecting unexpected side effects.
  6. Detecting legacy context API.
  7. Warning about deprecated findDOMNode usage
Back to all React questions
Get LinkedIn Premium at Rs 399