I want to create build file for my react app, and I don't want components to render in it two time, so do I have to remove <React.StrictMode> before running following command:
npm run build
I want to create build file for my react app, and I don't want components to render in it two time, so do I have to remove <React.StrictMode> before running following command:
npm run build
Copyright © 2021 Jogjafile Inc.
You don't need to remove
React.StrictModeafter you usenpm run build. React disables the strict modes for your production build.Although the Strict Mode checks only run in development, they help you find bugs that already exist in your code but can be tricky to reliably reproduce in production. Strict Mode lets you fix bugs before your users report them.https://react.dev/reference/react/StrictMode