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
1- npx create-next-app@latest -> Choose App Router
2- Create a [slug] dynamic route and create a page.tsx file with a minimal content and a console.log
3- export const revalidate = 30; in [slug]/page.tsx
4- yarn build && yarn start to start a production build
5- Load localhost:3000/anyslug
6- Refresh multiple times within 30 seconds
Current vs. Expected behavior
Current : console.log outputs log on every refresh.
Expected : console.log should output log only once within a 30 seconds window.
Provide environment information
nextjs 14.1.0
Which area(s) are affected? (Select all that apply)
App Router
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
revalidate was working as intended for dynamic routes with Page Router.
The text was updated successfully, but these errors were encountered:
export const generateStaticParams = async () => [] will 'enable' generating static versions of pages, but generate none at build time (empty array). export const dynamicParams = true will allow to generate pages for params that have not been generated at build time.
I think it was somehow similar with Pages Router.
I don't know if this is a workaround or the correct way things should be, so I'll leave the issue open for now but feel free to close it if this is actually not a bug.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/white-surf-3t2zj3?file=%2Fapp%2F%5Bslug%5D%2Fpage.tsx%3A7%2C43
To Reproduce
1-
npx create-next-app@latest
-> Choose App Router2- Create a [slug] dynamic route and create a
page.tsx
file with a minimal content and aconsole.log
3-
export const revalidate = 30;
in[slug]/page.tsx
4-
yarn build && yarn start
to start a production build5- Load
localhost:3000/anyslug
6- Refresh multiple times within 30 seconds
Current vs. Expected behavior
Current :
console.log
outputs log on every refresh.Expected :
console.log
should output log only once within a 30 seconds window.Provide environment information
Which area(s) are affected? (Select all that apply)
App Router
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
revalidate
was working as intended for dynamic routes with Page Router.The text was updated successfully, but these errors were encountered: