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:
- Go to http://localhost:3000/repro
- Click on "Home" link in the page
- 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