Unwrap doesn't unwrap the write function? #2720
Unanswered
stickfigure
asked this question in
Q&A
Replies: 1 comment
-
Good point. Sounds valid. |
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
-
Hi all, new to jotai, love it, but I'm a little puzzled about
unwrap
. It seems to unwrap the read operation but not the write operation? Is that deliberate? Here's a little more about my use case:I have an
atomWithDefault
that fetches data from a server:Now I want some way to create a new thing with a server call and add it to the existing list:
Using
unwrap(thingsAtom)
doesn't change anything. Theset()
method still works with promises. I'd love to not have to deal with promises here.Beta Was this translation helpful? Give feedback.
All reactions