Skip to content
Source
Sign inSign up
TanStack/router

[react-router, solid-router] Route context is missing when navigating away from a route too quickly #6040

Closedjakst(GitHub profile, opens in a new tab) opened this issue 2 comments

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

  1. Start the dev server and open up the app
  2. 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

Sign in to join this conversation.