router
router copied to clipboard
Loader is not properly waited on
Describe the bug
I have 1 route with a loader that will call various APIs. When the user clicks the Nav button, and does that again to get back to where they were (1 button redirects to /me2 the other back to /me), instead of rendering waiting for the loader to fetch, it just tries to render. This causes suspense errors with Tanstack Query.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-vbdugn?file=src%2Froutes%2Fme.tsx
Steps to Reproduce the Bug or Issue
- Go to
/me - Click the button (
Nav) - Do this again (you should be back to
/menow) - Suspense error
Expected behavior
Rendering properly waits for loading to finish.
Screenshots or Videos
1.1 and 1.2 are queries, rendering is rendering.
Platform
- OS: [e.g. macOS, Windows, Linux] Linux
- Browser: [e.g. Chrome, Safari, Firefox] Chrome & Firefox
- Version: [e.g. 91.1] FF 122.0, Chrome 121.0.6167.85
Additional context
No response