Showing a loading spinner on route change without router events
Unanswered
cstoeckl posted this in #help-forum
cstoecklOP
How do I show a loading spinner when changing a route in Next.js 13 where I can't listen to router events?
In Next.js 12 we had the
In Next.js 12 we had the
routeChangeStart and routeChangeEnd events to do that.5 Replies
@cstoeckl How do I show a loading spinner when changing a route in Next.js 13 where I can't listen to router events?
In Next.js 12 we had the `routeChangeStart` and `routeChangeEnd` events to do that.
you need a lot more work, i have an example here https://github.com/joulev/nextjs13-appdir-router-events
cstoecklOP
Wow thats a shame, seems like a pretty standard use case to me? But thanks for your link and for your work, will check it out.
Aplomado Falcon
Thanks for this example @joulev ! Helped me solve this problem as well
You’re welcome
East Siberian Laika
Hello, Chris