Skip to content

Commit 20301b3

Browse files
committed
Clarify conditional rendering outcomes
1 parent 0769ce9 commit 20301b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export default function SavedDraft() {
238238
239239
Like other calls to [`use`](/reference/react/use), you can call `use(browser())` conditionally. Unlike Hooks, `use` can be called after a conditional return or directly inside a conditional statement. This lets a Component or custom Hook opt out of server rendering based on a condition, such as the value of a prop passed to it.
240240
241-
For example, this `useTimeZone` Hook accepts an optional default value. When provided, React renders the default value in the initial HTML and in the browser. When it is not provided, `use(browser())` suspends the Component during server rendering, but `useTimeZone` returns the device's local time zone when rendering in the browser.
241+
For example, this `useTimeZone` Hook accepts an optional default value. When provided, React renders the default value in the initial HTML and in the browser. Without a default value, the Component suspends during server rendering and shows the device's local time zone in the browser.
242242
243243
Click **Reload** to see the loading fallback before the user's time zone appears.
244244
@@ -400,7 +400,7 @@ function ProductDetails({ productId, initialData }) {
400400
}
401401
```
402402
403-
If `initialData` is not provided, `useBrowserQuery` skips server rendering and leaves the closest [`<Suspense>`](/reference/react/Suspense) boundary's fallback in the HTML. In the browser, `use(browser())` does not suspend, so the query library can fetch the data or read it from its client cache as usual.
403+
If `initialData` is not provided, `useBrowserQuery` skips server rendering and leaves the closest [`<Suspense>`](/reference/react/Suspense) boundary's fallback in the HTML. In the browser, `useBrowserQuery` calls `useQuery`, allowing the query library to fetch the data or read it from its client cache as usual.
404404
405405
---
406406

0 commit comments

Comments
 (0)