Replies: 1 comment
-
interesting. I don't think we have such a feature yet. What we would need is to make
I'm not so sure if that api wouldn't be confusing. It would be the only function that gets something passed relating to the previous query state. I think you can do this manually for now by storing the previous teamId in a ref or so, e.g. with: https://usehooks.com/usePrevious/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! We have a few instances of
useQuery
withkeepPreviousData
true for pagination of tables, however, we've now got a situation where when we change context there's a flash of incorrect data until the new data is fetched.Let me use a tangible example. Let's say we're displaying a list of users that belong to a team and we have a
useQuery
implementation like so:What we want is for
keepPreviousData
to only return cached data if that cached data also satisfies theteamId
key, is there a way to do that?Beta Was this translation helpful? Give feedback.
All reactions