Skip to content
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

does not support multiple state setter in local storage #51

Open
skyrocketeer opened this issue Nov 24, 2021 · 0 comments
Open

does not support multiple state setter in local storage #51

skyrocketeer opened this issue Nov 24, 2021 · 0 comments

Comments

@skyrocketeer
Copy link

skyrocketeer commented Nov 24, 2021

let say I have a button that will set multiple states when being clicked:

const handleMultipleState = () => {
   setCount2(count2 + 1)
   setCount(count - 1)
 }

On UI (recoil state), the states are being mutated as an expected behavior. However, when you look into local storage, only the first state being persisted (in this case 'count2')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant