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

Component render twice when using useStore #112

Closed
seonghyeonkimm opened this issue May 18, 2020 · 1 comment
Closed

Component render twice when using useStore #112

seonghyeonkimm opened this issue May 18, 2020 · 1 comment

Comments

@seonghyeonkimm
Copy link

Issue

  • When state changes in store, component renders twice. Am I doing something wrong?
  • I posted the link below.

Codesandbox

https://codesandbox.io/s/zustand-example-jyoox?file=/src/App.js

@seonghyeonkimm
Copy link
Author

Sorry. I found out the reason why it renders twice. it was because of react <StrictMode>.

facebook/react#15074 (comment)

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