You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 onepisodeStore
. 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.The text was updated successfully, but these errors were encountered: