Skip to content

feat: add experimentalPostpone prop to Router for pathless SSR#162

Merged
uhyo merged 4 commits intomasterfrom
claude/integrate-react-postpone-dVxxK
Apr 8, 2026
Merged

feat: add experimentalPostpone prop to Router for pathless SSR#162
uhyo merged 4 commits intomasterfrom
claude/integrate-react-postpone-dVxxK

Conversation

@uhyo
Copy link
Copy Markdown
Owner

@uhyo uhyo commented Apr 8, 2026

During pathless SSR, renders null when no child route matches
(because there is no URL to match against), which causes hydration
mismatches when the client renders the actual route content.

Add an experimentalPostpone prop to Router that enables React's
experimental unstable_postpone() API. When enabled, Outlet calls
postpone() instead of rendering null during pathless SSR, telling React
to defer that content to client-side rendering.

This requires React Canary or experimental builds.

https://claude.ai/code/session_01WzZWbDcL9vm9ef5hHXMtB1

claude added 4 commits April 8, 2026 14:40
During pathless SSR, <Outlet /> renders null when no child route matches
(because there is no URL to match against), which causes hydration
mismatches when the client renders the actual route content.

Add an `experimentalPostpone` prop to Router that enables React's
experimental `unstable_postpone()` API. When enabled, Outlet calls
postpone() instead of rendering null during pathless SSR, telling React
to defer that content to client-side rendering.

This requires React Canary or experimental builds.

https://claude.ai/code/session_01WzZWbDcL9vm9ef5hHXMtB1
The experimentalPostpone feature requires React's unstable_postpone API
which is only available in React Canary builds.

https://claude.ai/code/session_01WzZWbDcL9vm9ef5hHXMtB1
The canary react-dom from the pathless SSR example was getting hoisted
and resolved by the router package's tests, causing a version mismatch
error. Pin react-dom explicitly to prevent this.

https://claude.ai/code/session_01WzZWbDcL9vm9ef5hHXMtB1
The router workspace package resolves react@19.2.4 (its own devDep)
while the example uses React Canary. Without resolve.dedupe, Vite loads
two React instances during the SSR build, causing a "Cannot read
properties of null" error on hooks.

https://claude.ai/code/session_01WzZWbDcL9vm9ef5hHXMtB1
@uhyo uhyo merged commit 175de67 into master Apr 8, 2026
1 check passed
@uhyo uhyo deleted the claude/integrate-react-postpone-dVxxK branch April 8, 2026 16:56
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