Next.js Discord

Discord Forum

Next 13 App page rendering twice

Answered
Black-capped Vireo posted this in #help-forum
Open in Discord
Avatar
Black-capped VireoOP
I am using app directory for first time, and i created a page on app/page, but if i put a useeffect with a console.log, i will receive two logs

it's impacting on app performance and hooks uses, how i can avoid this?
Image
Image
Answered by noli
Add reactStrictMode: false, to nextConfig array in next.config.js
View full answer

5 Replies

Avatar
Thats just react strict mode at work
It wont happen on production mode (since react strict mode doesn't work on production)
Avatar
Black-capped VireoOP
There's a way to disable it on local mode?
Avatar
@Black-capped Vireo There's a way to disable it on local mode?
Avatar
Add reactStrictMode: false, to nextConfig array in next.config.js
Answer
Avatar
Black-capped VireoOP
Thank u guys!