Next.js Discord

Discord Forum

how to avoid multiple loader resets when routing

Minskin posted this in #help-forum
Open in Discord
I have multiple nested routes and each level has loading.tsx file with a simple spinner on that. And every time this hits loading.tsx page the loading spinner re-starts is there way to get rid of this?

Here it the flow that i have

1) During Auth Show Loader
2) Fetch current team, show loader
3) Fetch projects, Show loader

And as you can see in the gif the loader restarts every time, is there way to mitigate this?

0 Replies