Next.js Discord

Discord Forum

loading page waterfall

Answered
Japanese pilchard posted this in #help-forum
Open in Discord
Japanese pilchardOP
I have pages such as /settings, /settings/account, and /settings/achievements, each with their own loading state.

However, since account and achievements are children of settings/ (settings/ also has a layout), it is rendering the settings loading state on initial load on slow devices and then half a second or so later, rendering the achievement pages loading state.

This is of course very sub-optimal, and I am wondering how I can solve this loading problem. This is why I don't have a base loading case for root route, because I don't want all the other routes inheriting this, and then having two loading stages for slow devices.

Any tips how to fix this (bind the root loading page only to the root page and not allow this inheritance)?

2 Replies