Skip to content

Clarify which pathname usePathname reads under rewrites - #100393

Merged
icyJoseph merged 1 commit into
canaryfrom
claude/docs-usepathname-rewrites
Oct 19, 2026
Merged

icyJoseph merged 1 commit into
canaryfrom
claude/docs-usepathname-rewrites

Conversation

@icyJoseph

Copy link
Copy Markdown
Member

Summary

Adjusts the "rewritten" wording used in the usePathname rewrites section and the blocking-prerender-client-hook error page. The old text called the prerendered path the "source" and the browser URL the "rewritten" path, which reads backwards against the source/destination keys in the rewrites config. It now says the server renders the rewrite destination (for example /blog/hello for app/blog/[slug]/page.tsx) while the browser keeps the URL it requested, which is what usePathname() returns on the client.

@github-actions github-actions Bot added the Documentation Related to Next.js' official documentation. label Oct 19, 2026
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 9d45d75

@icyJoseph
icyJoseph marked this pull request as ready for review October 19, 2026 13:06
@icyJoseph
icyJoseph merged commit 242a61f into canary Oct 19, 2026
58 checks passed
@icyJoseph
icyJoseph deleted the claude/docs-usepathname-rewrites branch October 19, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Related to Next.js' official documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants