route loader and query cache
A route loader prepares data for navigation.
Use this when A route and its component fetch the same resource independently.
without the term
“The route loader fetches the project and then the page component fetches it again with slightly different code. Can you make them use the same thing so it's only fetched once?”
with the term · How do you ask a model for route loader and query cache?
Use one query definition in this route loader and page. Verify fresh-cache navigation avoids duplicate requests and cancelled navigation cannot publish obsolete state.
What is route loader and query cache?
The loader starts fetching data during navigation, before the component renders. If the loader and the page use the same query definition, they share one cache entry and one request.
Why does route loader and query cache matter when vibe coding?
Two similar loading paths can drift in keys, permissions, or error handling.
How do you do route loader and query cache?
Share the data contract and define loading, error, and cancellation behavior across navigation.
What goes wrong with route loader and query cache?
Inventing a separate loader cache that the component never reads.