Skip to content

Add a conditional browser query example - #8617

Merged
aurorascharff merged 18 commits into
reactjs:mainfrom
aurorascharff:codex/browser-more-examples
Aug 31, 2026
Merged

Add a conditional browser query example#8617
aurorascharff merged 18 commits into
reactjs:mainfrom
aurorascharff:codex/browser-more-examples

Conversation

@aurorascharff

@aurorascharff aurorascharff commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

https://react-ch7zfadp5-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
@aurorascharff
aurorascharff merged commit 24618e2 into reactjs:main Aug 31, 2026
5 checks passed
@aurorascharff
aurorascharff deleted the codex/browser-more-examples branch August 31, 2026 22:28
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.

2 participants