Skip to content
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

docs: improve data fetching docs and add ISR page #69285

Merged
merged 6 commits into from
Aug 26, 2024
Merged

docs: improve data fetching docs and add ISR page #69285

merged 6 commits into from
Aug 26, 2024

Conversation

leerob
Copy link
Member

@leerob leerob commented Aug 25, 2024

This updates the data fetching, caching, and revalidating pages to use a more standardized template. There is also now more direct, concise examples and code snippets. Finally, I broke out "revalidating" into a new ISR page, to better match the terms people are searching for.

@ijjk ijjk added created-by: Next.js DevEx team Documentation Related to Next.js' official documentation. labels Aug 25, 2024
Copy link
Contributor

github-actions bot commented Aug 25, 2024

All broken links are now fixed, thank you!

@leerob
Copy link
Member Author

leerob commented Aug 26, 2024

Ran this locally to confirm things display as expected and things look decent 👍

next: { revalidate: 60 }, // Revalidate every 60 seconds
})
const data = await res.json()
let data = await fetch('https://api.vercel.app/blog')
Copy link
Member

@huozhi huozhi Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not blocking, but having const would be nice to avoid users extending the example but result in errors by mistake

@leerob leerob merged commit fea70f3 into canary Aug 26, 2024
53 checks passed
@leerob leerob deleted the isr-docs branch August 26, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Next.js DevEx team Documentation Related to Next.js' official documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants