Skip to content

How to revalidate multiple keys with useSWRMutation? #2456

Answered by koba04
utg1-tdawg asked this question in Q&A
Discussion options

You must be logged in to vote

@utg1-tdawg
The first argument of useSWRMutation doesn't accept a filter function, so you have to use mutate instead of useSWRMutation.

https://swr.vercel.app/docs/mutation#mutate-multiple-items

The documentation of useSWRMutation doesn't describe it, so I'll add it later. Thank you!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@utg1-tdawg
Comment options

@TrevorBurnham
Comment options

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