Different preload policies for code and loader (data) #1593
matclayton
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It seems like it would be optimal to be able to set a different preload policy for when the code (component) and data (loader) are loaded in by tanstack router. In our case (and I assume many) the code is relatively stable and we'd like want to load it in on "viewport" so we're ready in advance, however we'd likely only want to load the data in at "intent" to keep it as fresh as possible.
Further to this it would also be great if the "router" object could take a series of routes (maybe this should be set on the createRoute) to preload the code selective routes for when the site is first loaded to ensure we have as much JS loaded as possible. Although this is possible with the current lower level functions, it'd be nice to make this a higher order concept.
Beta Was this translation helpful? Give feedback.
All reactions