This repository has been archived by the owner on Jan 1, 2025. It is now read-only.
how to update recoil state using useRecoilCallback
and then do some other logic
#1356
Answered
by
drarmstr
emadbaqeri
asked this question in
Q&A
-
Hey folks, I was wondering about that how can I update an atom state inside the useRecoilCallback, this is because I want to store some data from the API and alongside that, I want to store the same data retrieved from the API to the local storage, |
Beta Was this translation helpful? Give feedback.
Answered by
drarmstr
Nov 29, 2021
Replies: 1 comment
-
The callback provided to |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
emadbaqeri
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The callback provided to
useRecoilCallback()
getsset()
andreset()
named parameters. These functions can be used to update atom state in the callback.