Replies: 1 comment
-
You are correct. Currently, |
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
-
I am a developer who uses (or abuses) swr too comfortably. First of all, I would like to say thank you for this.
Please understand that I am not good at English, so I used Google Translator.
The gist of the question is this: I would like to use global mutate to update the data of useSwrInfinity even in places other than its children.
Data is updated well with the KeyedMutator bound to useSwrInfinity, but when the getKey function is passed to global mutate, the data is not immediately updated (network call) as intended.
Did I misunderstand the mutate or options of useSWRInfinity?
Below is the code I tried.
I tried using the comparison operator directly in the key comparison function of mutate below, and the corresponding keys exist and the comparison statement returns true!
Beta Was this translation helpful? Give feedback.
All reactions