A package informs you when React.StrictMode is active and React will unmount and remount every component
react-reduce-stress
React comes with a lot of useful console logs and errors, but the ONE is missing. This package informs you when React.StrictMode is active and React will unmount and remount every component, whenever a component mounts for the first time.
Install
yarn add react-reduce-stress
import ReduceStress from "react-reduce-stress";
// just place it anywhere inside <React.StrictMode>
root.render(
<React.StrictMode>
<ReduceStress />
<App />
</React.StrictMode>
);
Roadmap
Sometimes you just really want supress a React console error (when it comes from a package). In the future we provide a simple API to do so.