mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Mention use as a Suspense-enabled data source (#6340)
Maybe it's debatable whether we want to link to canary APIs in other pages but I feel like here it's more useful than not.
This commit is contained in:
@@ -288,6 +288,7 @@ Streaming does not need to wait for React itself to load in the browser, or for
|
||||
|
||||
- Data fetching with Suspense-enabled frameworks like [Relay](https://relay.dev/docs/guided-tour/rendering/loading-states/) and [Next.js](https://nextjs.org/docs/getting-started/react-essentials)
|
||||
- Lazy-loading component code with [`lazy`](/reference/react/lazy)
|
||||
- Reading the value of a Promise with [`use`](/reference/react/use)
|
||||
|
||||
Suspense **does not** detect when data is fetched inside an Effect or event handler.
|
||||
|
||||
|
||||
@@ -287,6 +287,7 @@ Streaming does not need to wait for React itself to load in the browser, or for
|
||||
|
||||
- Data fetching with Suspense-enabled frameworks like [Relay](https://relay.dev/docs/guided-tour/rendering/loading-states/) and [Next.js](https://nextjs.org/docs/getting-started/react-essentials)
|
||||
- Lazy-loading component code with [`lazy`](/reference/react/lazy)
|
||||
- Reading the value of a Promise with [`use`](/reference/react/use)
|
||||
|
||||
Suspense **does not** detect when data is fetched inside an Effect or event handler.
|
||||
|
||||
|
||||
@@ -254,6 +254,7 @@ async function getAlbums() {
|
||||
|
||||
- Data fetching with Suspense-enabled frameworks like [Relay](https://relay.dev/docs/guided-tour/rendering/loading-states/) and [Next.js](https://nextjs.org/docs/getting-started/react-essentials)
|
||||
- Lazy-loading component code with [`lazy`](/reference/react/lazy)
|
||||
- Reading the value of a Promise with [`use`](/reference/react/use)
|
||||
|
||||
Suspense **does not** detect when data is fetched inside an Effect or event handler.
|
||||
|
||||
|
||||
@@ -82,10 +82,11 @@ During updates, the <CodeStep step={2}>deferred value</CodeStep> will "lag behin
|
||||
|
||||
<Note>
|
||||
|
||||
This example assumes you use one of Suspense-enabled data sources:
|
||||
This example assumes you use a Suspense-enabled data source:
|
||||
|
||||
- Data fetching with Suspense-enabled frameworks like [Relay](https://relay.dev/docs/guided-tour/rendering/loading-states/) and [Next.js](https://nextjs.org/docs/getting-started/react-essentials)
|
||||
- Lazy-loading component code with [`lazy`](/reference/react/lazy)
|
||||
- Reading the value of a Promise with [`use`](/reference/react/use)
|
||||
|
||||
[Learn more about Suspense and its limitations.](/reference/react/Suspense)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user