T
TanStack3mo ago
absent-sapphire

Is it possible to lazy load route tree instead of single lazy component?

According to the documentation at https://tanstack.com/router/latest/docs/framework/react/guide/code-splitting, I can create a lazy route with a component, but I want to lazy-load an entire nested route tree. Is that possible?
3 Replies
other-emerald
other-emerald3mo ago
you would need to lazy load each route of that tree individually are you using file based routing?
absent-sapphire
absent-sapphireOP3mo ago
No, file-based routing didn’t work for me — I have a lot of micro-frontend applications, and each one needs to load from a remote host and have its own router. React Router has functionality that's somewhat similar to what I need — lazy route discovery (fog of war). I’m trying to figure out whether there’s something similar in TanStack Router.
other-emerald
other-emerald3mo ago
no we don't have that yet

Did you find this page helpful?