Skip to content

Root beforeLoad data is not included in head on first load #6079

@vetledv

Description

@vetledv

Which project does this relate to?

Router

Describe the bug

Context returned from root route beforeLoad is always missing on first page load in any Routes head function after version 1.140.0

Your Example Website or App

https://stackblitz.com/edit/github-9ck4fvht?file=src%2Froutes%2F__root.tsx

Steps to Reproduce the Bug or Issue

  1. Load app, head logs will not include pageTitle
  2. Navigate to about, head logs has pageTitle
  3. Refresh page on about, all head logs will not include pageTitle

Expected behavior

I expect the context in head to include values returned from root route beforeLoad. This was the case up until version 1.140.0

Screenshots or Videos

No response

Platform

  • Router: 1.141.1
  • OS: macOS
  • Browser: Tested in Firefox, Chrome
  • Browser Version: Chrome 143.0.7499.41, Firefox 146.0
  • Bundler: vite
  • Bundler Version: 7.1.7

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions