Next.js Discord

Discord Forum

Loading states and SSG

Unanswered
andris posted this in #help-forum
Open in Discord
Hello world.
i have an issue with NextJS 13 loading states and SSG. When i have the SSG disabled and i navigate between dynamic urls the loading screen from loading.jsx is rendered properly. When i enable it in page.jsx by generateStaticParams the loading screen is not rendered. i tried to return only an empty array for dynamic routes but the result is the same: loading is not displayed. after the fetch is finished the page is properly rendered but missing the loading state.

is this a bug ? or a basic behaviour of NextJS 13? or how can i fix this? help pls

9 Replies

thx for your answer
@aardani basic behavior of SSG
wait no, it seems they are using dynamicParams: true which generates unknown params on-the-fly
which should render loading.js :thinkies:
(╯°□°)╯︵ ┻━┻