Skip to content

v6.4 Data Loader Caching Strategy #8961

Closed Answered by charliematters
bestickley asked this question in Q&A
Discussion options

You must be logged in to vote

You won't need to strictly, but if you want your loader functions to prepopulate your react query client as well as return the data, then you can transition from react-query to react router gradually.

The 6.4 branch revalidates all the loaders for a URL when you perform an action or use the the useRevalidator hook, at which point anything data returned from the loaders can be considered fresh.

That's the stage of migration I'm at currently, and I haven't checked whether any clever magic like the structural comparison of react-query occurs, which would minimise rerenders

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@bestickley
Comment options

@cliffordfajardo
Comment options

@bestickley
Comment options

@grumd
Comment options

Answer selected by bestickley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants