Modifying a selector #1281
Answered
by
drarmstr
arunmmanoharan
asked this question in
Q&A
-
Hi, I am fetching an API, destructuring it and storing values into individual selectors. I want to update a certain selector. I am able to do it using
Is there an alternate to achieve this or this the best way? This is my codesandbox: https://codesandbox.io/s/patient-star-wc430?file=/src/Connection.jsx:167-280 |
Beta Was this translation helpful? Give feedback.
Answered by
drarmstr
Oct 5, 2021
Replies: 1 comment
-
The two hooks could be combined with const [connection, setConnection] = useRecoilState(connectionState); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mondaychen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The two hooks could be combined with
useRecoilState()
: