-
Notifications
You must be signed in to change notification settings - Fork 28k
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
Getting Started docs: Fetching and Streaming #73352
Conversation
All broken links are now fixed, thank you! |
- Co-pilot doing me dirty again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some small comments
docs/01-app/01-getting-started/06-data-fetching-and-streaming.mdx
Outdated
Show resolved
Hide resolved
docs/01-app/01-getting-started/06-data-fetching-and-streaming.mdx
Outdated
Show resolved
Hide resolved
docs/01-app/01-getting-started/06-data-fetching-and-streaming.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Rich Haines <hello@richardhaines.dev>
docs/01-app/01-getting-started/06-data-fetching-and-streaming.mdx
Outdated
Show resolved
Hide resolved
|
||
> **Warning:** The content below assumes the [`dynamicIO` config option](/docs/app/api-reference/config/next-config-js/dynamicIO) is enabled in your application. The flag was introduced in Next.js 15 canary. | ||
When using `async/await` in Server Components, Next.js will opt into **dynamic rendering**. This means the data will be fetched and rendered on the server for every user request. If there are any slow data requests, the whole route will be blocked from rendering. To improve the initial load time and user experience, you can use streaming to break up the page's HTML into smaller chunks and progressively send those chunks from the server to the client. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we clarify that Next.js streams by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, what do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph reads like you need to opt-into streaming. But the App Router will stream by default, it's just how much content is included in the initial payload depends on your suspense boundaries. That's my understanding (which could be wrong!). Basically what I'm saying it, you can't turn streaming off, and you don't need to enable it.
Closes: https://linear.app/vercel/issue/DOC-3699/page-fetching-and-streaming-data