Skip to content

Commit 2e6ade6

Browse files
committed
Clarify browser-only example action
1 parent dcde1e1 commit 2e6ade6

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/content/reference/react-dom/browser.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Call `browser` inside `use` in a component that should only render in the browse
6969
7070
You can use this instead of checking `typeof window`, waiting for an [`Effect`](/reference/react/useEffect) to set mounted state, or using a framework option to disable server rendering.
7171
72-
Press **Render the page** to see the loading fallback. React then displays a draft loaded from `localStorage`.
72+
Press **Load draft**. The initial HTML contains the loading fallback. After hydration, React displays the draft loaded from `localStorage`.
7373
7474
<Sandpack>
7575
@@ -182,7 +182,7 @@ export async function flushReadableStreamToFrame(readable, frame) {
182182
<title>Browser-only rendering</title>
183183
</head>
184184
<body>
185-
<button id="render">Render the page</button>
185+
<button id="render">Load draft</button>
186186
<br /><br />
187187
<iframe id="preview" title="Rendered page"></iframe>
188188
</body>

src/content/reference/react/Suspense.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2386,7 +2386,7 @@ The server HTML will include the loading indicator. It will be replaced by the `
23862386
23872387
A Suspense boundary can provide a fallback for a browser-only component. Wrap the component in `<Suspense>` and call [`use(browser())`](/reference/react/use#use-browser) inside it.
23882388
2389-
Press **Render the page** to see the loading fallback. React then displays a draft loaded from `localStorage`.
2389+
Press **Load draft**. The initial HTML contains the loading fallback. After hydration, React displays the draft loaded from `localStorage`.
23902390
23912391
<Sandpack>
23922392
@@ -2499,7 +2499,7 @@ export async function flushReadableStreamToFrame(readable, frame) {
24992499
<title>Browser-only rendering</title>
25002500
</head>
25012501
<body>
2502-
<button id="render">Render the page</button>
2502+
<button id="render">Load draft</button>
25032503
<br /><br />
25042504
<iframe id="preview" title="Rendered page"></iframe>
25052505
</body>

src/content/reference/react/use.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ async function getData(url) {
13321332
13331333
Pass the value returned by [`browser`](/reference/react-dom/browser) to `use` inside a component that should only render in the browser.
13341334
1335-
Press **Render the page** to see the loading fallback. React then displays a draft loaded from `localStorage`.
1335+
Press **Load draft**. The initial HTML contains the loading fallback. After hydration, React displays the draft loaded from `localStorage`.
13361336
13371337
<Sandpack>
13381338
@@ -1445,7 +1445,7 @@ export async function flushReadableStreamToFrame(readable, frame) {
14451445
<title>Browser-only rendering</title>
14461446
</head>
14471447
<body>
1448-
<button id="render">Render the page</button>
1448+
<button id="render">Load draft</button>
14491449
<br /><br />
14501450
<iframe id="preview" title="Rendered page"></iframe>
14511451
</body>

0 commit comments

Comments
 (0)