routeChangeStart
routeChangeStart is an event emitted by the Next.js Router when a client-side route transition begins. It signals that the application is about to navigate to a new URL, allowing developers to respond immediately. The event listener receives the target URL as a string argument, which is commonly used to show a loading indicator, start a progress bar, or send navigation analytics.
Typical usage involves subscribing to the event with Router.events.on('routeChangeStart', handler) and performing any needed actions in
This event only fires for client-side transitions initiated by mechanisms such as next/link, router.push, or router.replace.