Skip to content

Commit 021f94d

Browse files
committed
Define "suspense-enabled-framework"
1 parent 4ddc1e3 commit 021f94d

6 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/content/reference/react-dom/server/renderToPipeableStream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Streaming does not need to wait for React itself to load in the browser, or for
292292
293293
Suspense **does not** detect when data is fetched inside an Effect or event handler.
294294
295-
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.
295+
The exact way you would load data in the `Posts` component above depends on your framework. If you use a [Suspense-enabled framework](/reference/react/Suspense#what-is-a-suspense-enabled-framework), you'll find the details in its data fetching documentation.
296296
297297
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.
298298

src/content/reference/react-dom/server/renderToReadableStream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ Streaming does not need to wait for React itself to load in the browser, or for
291291
292292
Suspense **does not** detect when data is fetched inside an Effect or event handler.
293293
294-
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.
294+
The exact way you would load data in the `Posts` component above depends on your framework. If you use a [Suspense-enabled framework](/reference/react/Suspense#what-is-a-suspense-enabled-framework), you'll find the details in its data fetching documentation.
295295
296296
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.
297297

src/content/reference/react/Activity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ Pre-rendering components with hidden Activity boundaries is a powerful way to re
763763

764764
Activity **does not** detect data that is fetched inside an Effect.
765765

766-
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.
766+
The exact way you would load data in the `Posts` component above depends on your framework. If you use a [Suspense-enabled framework](/reference/react/Suspense#what-is-a-suspense-enabled-framework), you'll find the details in its data fetching documentation.
767767

768768
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.
769769

src/content/reference/react/Suspense.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ title: <Suspense>
2929

3030
#### Caveats {/*caveats*/}
3131

32+
- Suspense does not detect when data is fetched inside an Effect or event handler. It only activates for the [resources listed below.](#what-activates-a-suspense-boundary)
3233
- React does not preserve any state for renders that got suspended before they were able to mount for the first time. When the component has loaded, React will retry rendering the suspended tree from scratch.
3334
- If Suspense was displaying content for the tree, but then it suspended again, the `fallback` will be shown again unless the update causing it was caused by [`startTransition`](/reference/react/startTransition) or [`useDeferredValue`](/reference/react/useDeferredValue).
3435
- If React needs to hide the already visible content because it suspended again, it will clean up [layout Effects](/reference/react/useLayoutEffect) in the content tree. When the content is ready to be shown again, React will fire the layout Effects again. This ensures that Effects measuring the DOM layout don't try to do this while the content is hidden.
@@ -219,9 +220,9 @@ A Suspense boundary displays its `fallback` while its content is loading, and it
219220

220221
<Note>
221222

222-
Suspense **does not** detect when data is fetched inside an Effect or event handler.
223+
#### What is a Suspense-enabled framework? {/*what-is-a-suspense-enabled-framework*/}
223224

224-
The exact way you would load data in the `Albums` component above depends on your framework. If you use a framework with built-in Suspense support, you'll find the details in its data fetching documentation.
225+
A *Suspense-enabled framework* integrates data fetching with Suspense, so that reading data in a component activates the nearest boundary. The exact way you load data in the `Albums` component above depends on your framework, and you'll find the details in its data fetching documentation.
225226

226227
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.
227228

src/content/reference/react/use.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ function Albums() {
472472
}
473473
```
474474
475-
Instead, pass a Promise from a cache, a Suspense-enabled framework, or a Server Component:
475+
Instead, pass a Promise from a cache, a [Suspense-enabled framework](/reference/react/Suspense#what-is-a-suspense-enabled-framework), or a Server Component:
476476
477477
```js
478478
// ✅ fetchData reads the Promise from a cache.
@@ -538,7 +538,7 @@ The `fetchData` function returns the same Promise each time it's called with the
538538
539539
<Note>
540540
541-
The way you cache Promises depends on the framework you use with Suspense. Frameworks typically provide built-in caching mechanisms. If you don't use a framework, you can use a simple module-level cache like the one above, or a [Suspense-enabled data source](/reference/react/Suspense#displaying-a-fallback-while-content-is-loading).
541+
The way you cache Promises depends on the framework you use with Suspense. Frameworks typically provide built-in caching mechanisms. If you don't use a framework, you can use a simple module-level cache like the one above, or a [Suspense-enabled data source](/reference/react/Suspense#what-is-a-suspense-enabled-framework).
542542
543543
</Note>
544544

src/content/reference/react/useDeferredValue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ During updates, the <CodeStep step={2}>deferred value</CodeStep> will "lag behin
8686

8787
<Note>
8888

89-
This example assumes you use a Suspense-enabled data source:
89+
This example assumes you use a [Suspense-enabled data source](/reference/react/Suspense#what-is-a-suspense-enabled-framework):
9090

9191
- Data fetching with Suspense-enabled frameworks like [Relay](https://relay.dev/docs/guided-tour/rendering/loading-states/) and [Next.js](https://nextjs.org/docs/app/getting-started/fetching-data#with-suspense)
9292
- Lazy-loading component code with [`lazy`](/reference/react/lazy)

0 commit comments

Comments
 (0)