mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #878] [MERGED] [codex] Fix usePathname hydration snapshot #914
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#914
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/878
Author: @southpolesteve
Created: 4/24/2026
Status: ✅ Merged
Merged: 4/24/2026
Merged by: @james-elicx
Base:
main← Head:codex/fix-usepathname-hydration📝 Commits (1)
d96404dfix usePathname hydration snapshot📊 Changes
2 files changed (+114 additions, -0 deletions)
View changed files
📝
packages/vinext/src/shims/navigation.ts(+30 -0)📝
tests/shims.test.ts(+84 -0)📄 Description
Fixes #871.
Summary
Symbol.forglobal so splitnext/navigationmodule instances read the same initial snapshot.usePathname(),useSearchParams(), anduseParams()from falling back to/during hydration.Validation
pnpm test tests/shims.test.ts -t "shares the hydrated navigation snapshot"pnpm test tests/nextjs-compat/use-client-page-pathname.test.ts tests/nextjs-compat/rsc-context-lazy-stream.test.ts🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.