Skip to content
Discussion options

You must be logged in to vote

This happens because static routes are pre-rendered and cached, so loading.tsx only appears during client-side transitions when data fetching is pending.

In your case, after calling revalidatePath("/prompts/list"), the new static asset is generated in the background, and the router doesn’t trigger a suspense boundary — hence no loading.tsx appears.

To fix it, you can:

Use a dynamic fetch (fetch(..., { cache: 'no-store' })) or export const dynamic = 'force-dynamic' to ensure a proper loading boundary.

Alternatively, wrap your list component in a boundary manually to force the skeleton render during revalidation transitions.

Static routes don’t automatically re-trigger loading.tsx after rev…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@issasalazar91
Comment options

Answer selected by issasalazar91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants