Skip to content

Add a conditional browser query example - #8617

Draft
aurorascharff wants to merge 1 commit into
reactjs:mainfrom
aurorascharff:codex/browser-more-examples
Draft

Add a conditional browser query example#8617
aurorascharff wants to merge 1 commit into
reactjs:mainfrom
aurorascharff:codex/browser-more-examples

Conversation

@aurorascharff

@aurorascharff aurorascharff commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

https://react-hyg4ud79r-react-foundation.vercel.app/reference/react-dom/browser#conditionally-rendering-in-the-browser

  • add a runnable example for conditionally calling use(browser()) from a Suspense-enabled query wrapper
  • show how initial data renders immediately while a query without initial data waits for the browser
  • keep the query implementation and server-rendering harness hidden so the visible example stays focused

Validation

  • npx prettier --config .prettierrc --check src/content/reference/react-dom/browser.md
  • npx eslint src/content/reference/react-dom/browser.md
  • yarn lint-heading-ids
  • verified locally that Reload first shows React mug with the loading fallback, then resolves React shirt

@github-actions

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@aurorascharff
aurorascharff marked this pull request as ready for review August 20, 2026 22:47
@aurorascharff
aurorascharff marked this pull request as draft August 20, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant