I experienced a couple times now the developers using React upgraded to React 18 or started a new project, had no idea about the new StrictMode behaviour and lost a lot of time figuring out that this is not bug in their code.
I wonder if it makes sense to inform them in the console and lead them to content explaining why. Ideally it could be turned off via the react-dev-tools.
Because you are using StrictMode in development React will unmount and remount every component, whenever a component mounts for the first time. Due remounting useEffect and useLayoutEffect run twice. Learn more here why it's important: https://reactjs.org/docs/strict-mode.html#ensuring-reusable-state
"StrictMode is a tool for highlighting potential problems in an application. Like Fragment, StrictMode does not render any visible UI. It activates additional checks and warnings for its descendants."
that means there's no need to hint. you will still have to debug it by yourself or remove React.StrictMode to stop remounting.
|Issue Title||Created Date||Updated Date|