-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reseting atom causes key to be empty instead of default value #26
Comments
I have released a new 2.3.0 version with your fix. |
This is still not working in version 2.4.0 |
The new version 2.5.0 with fix just released. |
bartvanremortele
added a commit
to bartvanremortele/recoil-persist
that referenced
this issue
Apr 16, 2021
…does not contain the key. Fixes polemius#26
bartvanremortele
added a commit
to bartvanremortele/recoil-persist
that referenced
this issue
Apr 16, 2021
…does not contain the key. Fixes polemius#26
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you reset the atom it becomes an empty state saved in storage. According to the docs https://recoiljs.org/docs/guides/atom-effects/#asynchronous-storage-persistence the key should be removed when it's a default value (at least for now)
the fix is to simply add this to onSet
The text was updated successfully, but these errors were encountered: