Skip to content

How to prevent cached data being shown until a button is clicked #8449

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

You must be logged in to vote

I think I've found a solution from: https://tkdodo.eu/blog/effective-react-query-keys#automatic-refetching which is to not use refetch but instead to store the filter state (I'm using jotai so in an atom) and when the apply button is clicked to update the state with the new filters

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TkDodo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant