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

Missing UseEffect Info on Zustand Recipe #166

Open
nabond251 opened this issue Jun 29, 2024 · 0 comments
Open

Missing UseEffect Info on Zustand Recipe #166

nabond251 opened this issue Jun 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nabond251
Copy link

nabond251 commented Jun 29, 2024

Describe the bug

Section Use Zustand in Components does not mention the useEffect dependency array in DemoPodcastListScreen.ts needs updated. As is, the stock template has the effect depending on episodeStore. I didn't realize I needed to remove this, and I got an infinite re-render error because the store variable kept updating every render, causing the effect to run, causing the store to update, etc. Only after checking the result repo did I realize this was what was happening. My rookie mistake, but it might be helpful to mention this in the docs.

@nabond251 nabond251 added the bug Something isn't working label Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant