T
TanStack12mo ago
rare-sapphire

Why is loader not fetch at the same time as the lazy load?

I've split my routes like this: src/routes/category/$.tsx -> has the loader and validateSearch src/routes/category/$.lazy.tsx -> only the component When I hover over a link to a category page, I see this in the network tab (check the image). It looks like the lazy-loaded content is fetched first, and then, once that's done, it fetches the loader resources. My question is: since I have my loader in the non-lazy route, shouldn't TanStack Router start fetching those resources right away? Am I missing a setting to make that happen? Thanks!
No description
3 Replies
fair-rose
fair-rose12mo ago
GitHub
Release v1.58.2 · TanStack/router
Version 1.58.2 - 9/18/24, 9:46 PM Changes Fix react-router: kick off loader early (#2368) (4e6e66f) by Manuel Schiller Packages @tanstack/react-router@1.58.2 @tanstack/react-router-with-query@1....
fair-rose
fair-rose12mo ago
please try again
rare-sapphire
rare-sapphireOP12mo ago
Thank you! ill check when i get home!

Did you find this page helpful?