79113209

Date: 2024-10-22 09:01:16
Score: 2
Natty:
Report link

Duplicated: React Hooks: useEffect() is called twice even if an empty array is used as an argument

Remove <React.StrictMode> from index.js.

This code will be from this

root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

to this

root.render(
    <App />
);

React StrictMode renders components twice on dev server

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: J.Nexus