Skip to content

Context value coming from beforeLoad isn't propagated to sub-route while loader of sub-route is executing #7602

Closed

Description

@ulrichstark

Which project does this relate to?

Router

Describe the bug

Context value coming from beforeLoad isn't propagated to sub-route while loader of sub-route is executing

Complete minimal reproducer

https://github.com/ulrichstark/tanstack-repro-context-value-not-propagated-while-loader-is-executing

Steps to Reproduce the Bug

Setup:

git clone https://github.com/ulrichstark/tanstack-repro-context-value-not-propagated-while-loader-is-executing
cd tanstack-repro-context-value-not-propagated-while-loader-is-executing
npm i
npx vite

Then:

  1. Go to http://localhost:3000/repro
  2. Click on "Home" link in the page
  3. Use the browser's back button

Expected behavior

The /repro should immediately render number as 42 and never as undefined.

Screenshots or Videos

No response

Platform

  • Router / Start Version: [e.g. 1.121.0]
  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Browser Version: [e.g. 91.1]
  • Bundler: [e.g. vite]
  • Bundler Version: [e.g. 7.0.0]

Additional context

No response

Activity

  1. added 3 commits that reference this issue on Jun 15, 2026
    9698aee
    3cb972f
    eeedf96
  2. added 3 commits that reference this issue on Jun 25, 2026
    4f35374
    aadf3ba
    e9acd3a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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