Skip to content

Commit cc37151

Browse files
committed
update
1 parent b310a12 commit cc37151

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/routes/reference/components/suspense.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description: >-
1515
Render fallback content while resources read under the boundary are pending.
1616
---
1717

18-
`<Suspense>` tracks resources read under its boundary.
18+
`<Suspense>` renders `fallback` while resources read under its boundary are pending.
1919

2020
## Import
2121

@@ -50,11 +50,13 @@ Subtree inside the suspense boundary.
5050

5151
- **Type:** `JSX.Element`
5252

53+
Returns the rendered subtree or `fallback` content depending on pending tracked resources.
54+
5355
## Behavior
5456

5557
- `<Suspense>` is triggered when a resource is read inside the boundary.
5658
- The boundary waits until pending tracked resources resolve.
57-
- `<Suspense>` is non-blocking: the subtree still runs while the fallback is rendered.
59+
- `<Suspense>` is non-blocking: the subtree can continue running before the boundary reveals the resolved content in the DOM.
5860
- Nested suspense boundaries handle resources read under the nearest boundary.
5961
- `onMount` and `createEffect` inside the suspended subtree run after the boundary resolves.
6062

@@ -63,8 +65,6 @@ Subtree inside the suspense boundary.
6365
### Basic usage
6466

6567
```tsx
66-
import { Suspense } from "solid-js";
67-
6868
<Suspense fallback={<LoadingSpinner />}>
6969
<AsyncComponent />
7070
</Suspense>;
@@ -73,9 +73,7 @@ import { Suspense } from "solid-js";
7373
### Nested suspense
7474

7575
```tsx
76-
import { Suspense } from "solid-js";
77-
78-
<Suspense fallback={<div>Loading page</div>}>
76+
<Suspense fallback={<div>Loading page...</div>}>
7977
<h1>{title()}</h1>
8078
<Suspense fallback={<div>Loading details</div>}>
8179
<DataComponent>{data()}</DataComponent>

0 commit comments

Comments
 (0)