Next.js Discord

Discord Forum

Next 13 App page rendering twice

Answered
Black-capped Vireo posted this in #help-forum
Open in Discord
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?
Answered by noli
Add reactStrictMode: false, to nextConfig array in next.config.js
View full answer

5 Replies

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