reactStrictMode
Source URL: https://nextjs.org/docs/app/api-reference/config/next-config-js/reactStrictMode
reactStrictMode
Section titled “reactStrictMode”Good to know: Since Next.js 13.5.1, Strict Mode is
trueby default withapprouter, so the above configuration is only necessary forpages. You can still disable Strict Mode by settingreactStrictMode: false.
Suggested: We strongly suggest you enable Strict Mode in your Next.js application to better prepare your application for the future of React.
React’s Strict Mode is a development mode only feature for highlighting potential problems in an application. It helps to identify unsafe lifecycles, legacy API usage, and a number of other features.
The Next.js runtime is Strict Mode-compliant. To opt-in to Strict Mode, configure the following option in your next.config.js:
module.exports = { reactStrictMode: true,}