Approach to update data after mutation #5420
Unanswered
petrovmiroslav
asked this question in
Q&A
Replies: 1 comment 1 reply
-
those are the two options, yeah, both have advantages and disadvantages.
if a user has the time to scroll down 99 times, then yeah, that's what happens. in v5, you'll have the option to provide |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
Sorry for my English.
I'd like to make things clear, whether I understand it right how to use ReactQuery.
For example, I have two entities:
On a profile page there are user info, some user lists and some post list.
Also, there is a form to change user info on the page.
After a user fetches 100 pages of posts and then changes userName, what should be done to userName changes everywhere?
Should I invalidate all queries where the user data might contain? But in that case the 100 pages of posts will refetch again. Is that OK?
Or should I use
setQueriesData
and check all users in all pages in all infinite query caches, which has the complexity of O(n³)?Or is there another approach?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions