Skip to content

Next.js 13: Client side navigation does not update head #42414

Closed
@shadcn

Description

@shadcn

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
	Platform: darwin
	Arch: x64
	Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64
Binaries:
	Node: 16.18.0
	npm: 8.19.2
	Yarn: 1.22.19
	pnpm: 7.13.5
Relevant packages:
	next: 13.0.2-canary.2
	eslint-config-next: 13.0.0
	react: 18.2.0
	react-dom: 18.2.0

What browser are you using? (if relevant)

Bug present in all browsers

How are you deploying your application? (if relevant)

Local and Vercel

Describe the Bug

On client side navigation, head.tsx is not updating the DOM. Works fine when you force a refresh.

Using the current file structure:

├── posts
│   └── [id]
│       ├── head.tsx
│       └── page.tsx
├── head.tsx
├── layout.tsx
└── page.tsx

See repo at: https://github.com/shadcn/next-debug-head

Expected Behavior

Expected the <title /> tag to be updated on client side navigation.

Link to reproduction

https://next-debug-head.vercel.app

To Reproduce

  1. Click on Post one. Check the title.
  2. Refresh the page. Check the title again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions