You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 35abef0
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/content/reference/react-dom/browser.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,7 +234,7 @@ export default function SavedDraft() {
234
234
235
235
---
236
236
237
-
### Conditionally rendering on the server {/*conditionally-rendering-in-the-browser*/}
237
+
### Conditionally rendering on the server {/*conditionally-rendering-on-the-server*/}
238
238
239
239
Unlike Hooks, [`use`](/reference/react/use) can be called inside a conditional statement or after an early return.
240
240
@@ -402,9 +402,9 @@ function ProductDetails({ productId, initialData }) {
402
402
}
403
403
```
404
404
405
-
When `initialData` is provided, `useBrowserQuery`calls `useQuery` during server rendering, and React includes the rendered content in the HTML.
405
+
When `initialData` is provided, `useBrowserQuery`skips the call to `use(browser())` and passes the initial data to `useQuery`. This lets the Component render on the server.
406
406
407
-
Without `initialData`, `useBrowserQuery` calls `use(browser())`, suspending the Component and leaving the closest [`<Suspense>`](/reference/react/Suspense) boundary's fallback in the HTML.
407
+
Without `initialData`, `useBrowserQuery` calls `use(browser())`. React leaves the closest [`<Suspense>`](/reference/react/Suspense) boundary's fallback in the server-rendered HTML.
408
408
409
409
In the browser, `useBrowserQuery` calls `useQuery` in both cases, allowing the query library to fetch the data or read it from its client cache as usual.
0 commit comments