Add generateStaticParams to ISR dynamic page and it will be run in dev mode. In the example above go to /app/isr/[id]/page.tsx and you will see that it is run in dev mode.
Describe the Bug
From my understanding generateStaticParams should be run only at build time, to quote the docs:
The generateStaticParams function runs at build time before the corresponding Layouts or Pages are generated. It will not be called again during revalidation (ISR).
Fetching data for pre-rendering in dev mode is kinda an overhead and waste of resources. For now I am using a workaround:
Alternatively update the docs to reflect that this also runs in dev mode. I would imagine this is useful if you wish to test out the method. But in my opinion next build should be used to test it because it will have correct env and variables.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered:
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://github.com/vercel/app-playground
To Reproduce
Add
generateStaticParams
to ISR dynamic page and it will be run in dev mode. In the example above go to/app/isr/[id]/page.tsx
and you will see that it is run in dev mode.Describe the Bug
From my understanding
generateStaticParams
should be run only at build time, to quote the docs:Fetching data for pre-rendering in dev mode is kinda an overhead and waste of resources. For now I am using a workaround:
Expected Behavior
generateStaticParams
runs only at build time.Alternatively update the docs to reflect that this also runs in dev mode. I would imagine this is useful if you wish to test out the method. But in my opinion
next build
should be used to test it because it will have correct env and variables.Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: