atomWithImmer not working with atomWithStorage #2618
Replies: 2 comments
-
I think I figured it out, you need to do the following:
I think this is because |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yeah, it's currently a limitation. Combining atomWithFoo and atomWithBar isn't possible. I think there are some other discussions discussing about it. |
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
-
When I combine atomWithStorage with atomWithImmer I am not able to write to the atom. Here is a minimal code example:
When I try to access the property
ex1
fromsetPersistInfo
I am given the following error:If I remove
atomWithStorage
and useatomWithImmer
directly, this example works. How do I combineatomWithStorage
withatomWithImmer
and write to properties as if I were just usingatomWithImmer
?Thanks in advance for the help.
Beta Was this translation helpful? Give feedback.
All reactions