Is there an API that can refresh a specific atom? #504
-
Is there an API that can refresh a specific atom, something similar to react-query |
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Jun 4, 2021
Replies: 1 comment 2 replies
-
Hi, if it's a sync atom, refreshing means reset, like setting the default value, right? |
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
It's just handy. Not necessary.
Okay, async or not, the derived atom can't be reset.
In such use cases, I'd create a new atom, or we can now store a promise as an atom value.
Hm, if you just need to refetch, you could add another dependency.