Next.js Discord

Discord Forum

Nested Routes Don’t Use loading.tsx

Unanswered
Crème D’Argent posted this in #help-forum
Open in Discord
Crème D’ArgentOP
Hello!

I’m having trouble understanding something.

I have a loading.tsx in my app/ folder. Whenever I do a navigation to routes that aren’t a parent or child route, I see the loading component from loading.tsx. However, if I navigate to a parent or child route, I do not see the loading component, and the navigation takes a while to happen.

My pages are react server components.

Here’s an example of navigations that use the loading component
/home -> /account
/account/manage -> /about


Here’s an example of navigations that don’t use the loading component:
/account -> /account/manage
/account/manage -> /account

Why does the loading component display for some components but not others?

Thanks.

0 Replies