loading.tsx ignored when using dynamic routes #59627
Replies: 4 comments 2 replies
-
I am also facing the same issue. |
Beta Was this translation helpful? Give feedback.
-
I am also experiencing this issue. |
Beta Was this translation helpful? Give feedback.
-
In case anyone is looking for a temp workaround. Using the Suspense fallback pattern appears to work instead of using the loading.tsx file. Just rename loading.tsx to something like LoadingUI.tsx For example:
|
Beta Was this translation helpful? Give feedback.
-
I'm having the same issue with loading text. I think it's a problem on this loading part. |
Beta Was this translation helpful? Give feedback.
-
When using dynamic routes, the dynamic route loading state looks for the closest parent loading state. That causes the routes under the dynamic route to render the parent loading.tsx rather than their own loading.tsx
We have these files:
app/dashboard/loading.tsx
app/dashboard/[slug]/monitor/page.tsx
app/dashboard/[slug]/monitor/loading.tsx
-> when routing to
app/dashboard/[slug]/monitor/page.tsx
, the correspondingapp/dashboard/[slug]/monitor/loading.tsx
does not get loaded. Rather, the dashboardapp/dashboard/loading.tsx
gets loaded, which is the nearest parent loading.tsx for [slug] folder.Shoud I open a bug report or am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions