Skip to content

Conversation

rickhanlonii
Copy link
Member

These notes were not fully updated when use(promise) was released. Now that there's an official way to suspend, we don't need so many caveats and scary warnings to use a data fetching library. It's just:

For Suspense you need to suspend, and here are the options

Copy link

github-actions bot commented Sep 11, 2025

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

The exact way you would load data in the `Posts` component above depends on your framework. If you use a Suspense-enabled framework, you'll find the details in its data fetching documentation.

Suspense-enabled data fetching without the use of an opinionated framework is not yet supported. The requirements for implementing a Suspense-enabled data source are unstable and undocumented. An official API for integrating data sources with Suspense will be released in a future version of React.
Since Effects are not mounted, only data fetched in render using Suspense will be pre-rendered.
Copy link
Contributor

Choose a reason for hiding this comment

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

But we can still warm up caches to reduce waterfalls right?

I mean calling React Query queryClient.prefetchQuery() while pre-rendering for example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants