Skip to content

fix: update use.md pitfall to make conditional calling clearer#8499

Merged
rickhanlonii merged 9 commits into
reactjs:mainfrom
MaxwellCohen:use-pitfall
Jun 25, 2026
Merged

fix: update use.md pitfall to make conditional calling clearer#8499
rickhanlonii merged 9 commits into
reactjs:mainfrom
MaxwellCohen:use-pitfall

Conversation

@MaxwellCohen

Copy link
Copy Markdown
Contributor

This PR helps clarify that use should be called based on Promise readiness/status, based on what @gaearon pointed out on bluesky that "nit: this seems misleading out of context. it shouldn't say always use unconditionally. it's just promise readiness that you shouldn't check. it can be conditional on other stuff (data, props, etc)"

CC @rickhanlonii @aurorascharff

@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! 🙌

Comment thread src/content/reference/react/use.md Outdated
Comment thread src/content/reference/react/use.md Outdated
Comment thread src/content/reference/react/use.md Outdated
Add warning about bypassing `use` and its effects on React Suspense.
Comment thread src/content/reference/react/use.md
Clarify usage of `use` hook regarding Promise handling.
@rickhanlonii rickhanlonii merged commit 93f6c27 into reactjs:main Jun 25, 2026
3 checks passed
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