Phaser-Next Template + Navbar restarts twice

I download and install the Phaser-Next template but added a Navbar at the top
https://phaser.io/news/2024/03/official-phaser-3-and-nextjs-template

When I click on other pages on the navbar , page1 then back to home it restarted the Phaser engine twice…

Is ths normal ?
how do I fix this ??

Here is the repo with the Phaser-Next template + navbar if you want to replicate the issues.

https://github.com/stanleyseow/phaser-next-navbar

this is normal for dev mode, because react strict mode enabled
more info: <StrictMode> – React
you can disable it in nextjs.config.js: next.config.js Options: reactStrictMode | Next.js

1 Like