The problem
At time of writing, many of the router.events
— such as routeChangeStart()
— that exist in the pages router of NextJS, are not currently available with the new app router.
There are many discussion threads on GitHub covering this issue, but at this time, the official docs don’t provide a clear way of preventing page…