Revalidate all requests #984
Unanswered
JuanCaicedo
asked this question in
Q&A
Replies: 1 comment 2 replies
-
If |
Beta Was this translation helpful? Give feedback.
2 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.
-
Hi everyone! I'm using SWR to show a paginated component, very similar to the example in the docs. My key looks something like
I would like to upload a new list of items, and I want to tell SWR to revalidate all items requests since they will no longer be valid. I'm assuming
mutate
is still the right avenue to do this, but is there a way that I can tell mutate to invalidate many keys at once? Or ever better, all keys that match/api/items(.*)
?Thank you! I've also asked this on Stackoverflow if any of you would like to answer there 😀 https://stackoverflow.com/questions/66231471/how-to-mutate-multiple-swr-keys
Beta Was this translation helpful? Give feedback.
All reactions