Skip to content

Is it possible to combine filters for different mutations in useIsMutating hook #3426

Answered by TkDodo
JohnnyJumper asked this question in Q&A

You must be logged in to vote

you can try useIsMutating({ predicate: (mutation) => mutation.key === ... || mutation.key === ... })

with predicate, you can return true or false for every matching mutation. If your keys are known and you don't need fuzzy matching of keys, you should be able to combine them.

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@JohnnyJumper

Answer selected by JohnnyJumper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants