[RTK-Query] Batch store update with API invalidation #5092
Unanswered
krumpyzoid
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Can you clarify the question? What does "batch" mean behavior-wise in this case? |
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.
-
I have a reload button which does two things:
I tried two approaches:
handleReload
onClick handler dispatch both calls (tried both orders of dispatch calls)extraReducers
In both cases, I end up with a lot of duplicated queries, because refreshing the time range will already refetch all the queries that depend on the time range as query args, and then reload all queries with the invalidated tags.
Is there a way to prevent this by "batching" the two operations ?
Beta Was this translation helpful? Give feedback.
All reactions