Which project does this relate to?
Router
Describe the bug
When instantly navigating away from a route (like directly inside an effect), the layout above get's undefined as route context, if the route context finishes loading after the navigation.
The example is in solid-router, but the same issue exists with react-router.
Your Example Website or App
https://github.com/jakst/tsr-missing-route-context
Steps to Reproduce the Bug or Issue
- Start the dev server and open up the app
- Notice the alert being printed about missing route context (which should always exist)
Expected behavior
I expect the route context to always be defined
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.140.0
- OS: MacOS
- Browser: Chrome
- Browser Version: 143
- Bundler: vite
- Bundler Version: 7.2.6
Additional context
No response