Post Request in Selector #1896
-
I wanted to get the response from the Axios post request and then update the atom based on the response from the API call. I have tried to do the async set in the selector, but this is not supported right now. So what alternative approach I can use right now for this purpose?
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Store each |
Beta Was this translation helpful? Give feedback.
-
@honzabrecka I have to frequently update and delete and the libraries from the library atom using api request, so I guess creating atomFamily for each of the library won't be a good idea |
Beta Was this translation helpful? Give feedback.
-
To me |
Beta Was this translation helpful? Give feedback.
Store each
library
inatomFamily
and do the fetch there. Inlibraries
store just pointers (ids) to them.