router icon indicating copy to clipboard operation
router copied to clipboard

Loader is not properly waited on

Open samchouse opened this issue 1 year ago • 0 comments

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

  1. Go to /me
  2. Click the button (Nav)
  3. Do this again (you should be back to /me now)
  4. Suspense error

Expected behavior

Rendering properly waits for loading to finish.

Screenshots or Videos

image 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

samchouse avatar Feb 10 '24 05:02 samchouse