mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #688] usePathname returns invalid value on SSR #147
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#147
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?
Originally created by @matej-io on GitHub (Mar 25, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/688
The app router usePathname() hook in client component causes hydration error because the value on server render is always just '/' but on client is actual correct current path.
Minimal example code would be:
Browser console output:
I'm attaching minimal project with above code example.
Once vinext server is running (
pnpm dev:vinext) openhttp://localhost:3001/use_pathnameto reproduce the issue.my-app.zip