You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The page beers uses the searchParams prop so should only be rendered during request time. But it is still rendered during build time, notice the "this is run" logs below:
The page is correctly run again during request time, but the run during build is completely unnecessary and should not happen.
If I explicitly opt into dynamic rendering with export const revalidate = 0, the bug doesn't happen.
Verify canary release
I verified that the issue exists in the latest Next.js canary release
This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.
Link to the code that reproduces this issue
https://github.com/joulev/debug/tree/nextjs-some-more-bugs
To Reproduce
next build
Current vs. Expected behavior
The page
beers
uses thesearchParams
prop so should only be rendered during request time. But it is still rendered during build time, notice the "this is run" logs below:The page is correctly run again during request time, but the run during build is completely unnecessary and should not happen.
If I explicitly opt into dynamic rendering with
export const revalidate = 0
, the bug doesn't happen.Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:42:57 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8112 Binaries: Node: 20.3.1 npm: 9.6.7 Yarn: 1.22.19 pnpm: 8.6.12 Relevant Packages: next: 13.5.3-canary.3 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
App Router
Additional context
Related to #55702 where behaviours also differ between implicit dynamic rendering and explicit dynamic rendering.
The text was updated successfully, but these errors were encountered: