useIsMutating and useMutationState always trigger rerenders #6967
Replies: 2 comments
-
can you show a reproduction please because that should not be the case |
Beta Was this translation helpful? Give feedback.
0 replies
-
Disregard that; I am unable to replicate the issue. I will provide my 'reproducible' case as evidence that contradicts my previous statement: https://stackblitz.com/edit/tanstack-query-vba6tk?file=src%2Findex.jsx |
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.
-
Currently, the issue is that the two hooks,
useIsMutating
anduseMutationState
, always trigger a rerender, regardless of the specifiedmutationKey
to filter. For instance, if I have a grid of 100x100, and each cell can have its own loading state, I would use amutationKey
like['CELL', 3, 7]
for mutations. Unfortunately, all cells now trigger a rerender. Do you have any solution for this?You can also see this when justing using a key for the filter which does not even exist, e.g.
Beta Was this translation helpful? Give feedback.
All reactions