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

fix: evaluate selector if state is changed #179

Merged
merged 1 commit into from
Sep 7, 2020
Merged

Conversation

dai-shi
Copy link
Member

@dai-shi dai-shi commented Sep 6, 2020

Close #123

There was a bug. It ignores state updates when react rerenders before zustand propagates updates.

Thanks @andrew-me for reporting this.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 6, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5d25b5d:

Sandbox Source
React Configuration
React Typescript Configuration

@dai-shi
Copy link
Member Author

dai-shi commented Sep 6, 2020

Here's the fixed example: https://codesandbox.io/s/wandering-meadow-ogsgz

@dai-shi dai-shi mentioned this pull request Sep 7, 2020
Copy link
Member Author

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be fine.

@dai-shi dai-shi merged commit e81848f into master Sep 7, 2020
@dai-shi dai-shi deleted the fix/issue-123 branch September 7, 2020 22:54
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

Successfully merging this pull request may close these issues.

Selectors defined outside of a render function do not always return the associated store value
1 participant