Replies: 1 comment
-
why would you have this block at all? Just use invalidateTags: ["Sessions"], and remove the block, like below?
As you mentioned manually invalidating it, and letting it invalide using invalidatesTags on top of that might cause redundancies. If you want to invalidate only on error or success you can use the functional form of invalidatesTags
|
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.
Uh oh!
There was an error while loading. Please reload this page.
-
In here the cache is being invalidated two times if
queryFulfilled
rejects resulting in two network requests:Would it be ok to add
dispatch(authApi.util.invalidateTags(["Sessions"]));
on the success result as well and removeinvalidatesTags
altogether?Beta Was this translation helpful? Give feedback.
All reactions