ta
TanStack
GitHub
router
Workspace
GitHub
CI Pipeline Executions
Filtered
Runs
Demo
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Overview
⌘K
router
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
GitHub
router
Workspace
Failed
8292
708860d3 fix(react-router,router-core): hydrate Link active state against the server location `useLinkProps` derives its `href` and active state from `useStore(router.stores.location, ...)`. `@tanstack/react-store` passes the same live `source.get()` as both `getSnapshot` and `getServerSnapshot`, so React reads the current location while a boundary is hydrating. A navigation that starts after the shell hydrates but before the route content does publishes its destination to `stores.location` synchronously, so every `<Link>` in the not-yet-hydrated content that points at the pending destination hydrated as active against HTML the server rendered as inactive. `hydrate` now records the location it claimed the SSR payload with on `router._hydrationLocation`, and `selectLinkState` resolves against that location until `useHydrated` flips, then re-derives against the live location. This also fixes `href` for relative links, which the server builds from the SSR location while the client was building it from the pending one. Active state is not suppressed during hydration: the server renders `data-status="active"` for the current page's links, so suppressing it would create the mismatch in the opposite direction. The added tests assert both directions. Fixes #8233
by shunn2
s
Previous
Next