Repository navigation
fix(react-start): keep calling use() after a hydration gate resolves - #9007
pcbeingused333 wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: fc364ff The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Fixes #8997
🎯 Changes
HydrationGatesuspends throughuse()while the gate is pending but returned early once it resolved, which React 19.3 reports as a conditionaluse().HydrationGatenow callsuse()on every client render. The React 18 path (throwing the promise) is unchanged.gate.resolve()marks the gate's promise asfulfilledsynchronously, souse()doesn't suspend on an already resolved gate React hasn't tracked yet.Tests cover both and fail without the change. The workspace is on React 19.2.9, which lacks this warning, so the component test asserts the
use()calls rather than the console message.A code-split route can still log the same warning from
Lazy(#8487); not touched here.This PR was prepared with AI assistance.
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit