-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic data fetching not working #43879
Comments
I have a similar issue when using (on 13.0.6-canary) |
I have the same issue with /todo/list/page.tsx Option "revalidate=0" doesn't allow to get fresh page. |
The server-side caching (i.e. This issue is a duplicate of #42546 |
I have a similar issue , I have to keep pressing refresh to avoid errors. Source
My Code Thanks. |
set export const revalidate = 0; in your api/route example : export const revalidate = 0;
} |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Data fetching (gS(S)P, getInitialProps)
Link to the code that reproduces this issue
https://github.com/robcaldecott/nextjs-app-fetch-no-store
To Reproduce
npm run dev
./data
page will load andfetch
the current time from a 3rd-party API.Describe the Bug
I am following the docs trying to use a dynamic
fetch
to mimic the oldgetServerSideProps
behaviour. I am using{ cache: "no-store" }
in myfetch
but this is only called once when the page first renders whereas I would expect this to be called every time the page loads. Every time the page loads I get the initial data.I have tried
revalidate = 0
and the various segment options to force dynamic but nothing seems to work.Expected Behavior
I would expect the page to fetch the data every time it loads.
Which browser are you using? (if relevant)
Chrome 108.0.5359.71
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: