generateStaticParams or dynamic='force-static'; required* to enable ISG for dynamic segments?
Unanswered
Sander posted this in #help-forum
SanderOP
So the thing is that NextJS is static by default but making a dynamic route such as
And we route to
By default the page is always dynamically rendered. Even if you add
The only way to make it static currently is to add:
OR
Also while forcing static by doing this while waiting for the page to load no
The page stays on the current page until the request is finished, giving 0 feedback to the user that we are waiting for the page.
Is this by design? Am I missing something regarding static dynamic routes?
Is the no loading page a bug?
Also can server actions be cached while using the
/[paramA]/[paramB].And we route to
http://localhost:3000/a/bBy default the page is always dynamically rendered. Even if you add
export const revalidate = 900;.The only way to make it static currently is to add:
export const generateStaticParams = async () => {
return [];
};OR
export const dynamic = 'force-static';Also while forcing static by doing this while waiting for the page to load no
loading.tsx is shown.The page stays on the current page until the request is finished, giving 0 feedback to the user that we are waiting for the page.
Is this by design? Am I missing something regarding static dynamic routes?
Is the no loading page a bug?
Also can server actions be cached while using the
page.tsx searchParams data?