-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix bugs and add tests for sync storage #1
Conversation
Thank you @barbogast I will check that. |
after finalizing the |
|
||
expect(useStore.getState()).toEqual({ count: 0 }) | ||
expect(postRehydrationCallbackCallCount).toBe(1) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparing against https://github.com/pmndrs/zustand/blob/master/tests/persist.test.tsx, this looks good to me.
How about we merge this PR as it is? Then all the relevant code would be in pmndrs#403 and we would be back to one place in which the conversation happens. Working on |
Hmm, I was thinking to first have a final solution on how to implement |
I will cherry-pick the test part for now. |
I guess the tests are the important part, so yeah, I agree. 7052e64 is also relevant, AFAICS, since it fixes the initial loading of the state from localStorage. |
the tests are now available on |
No description provided.