Excessive unmount/remount after calling zustand's set #3150
Answered
by
dai-shi
heshiming
asked this question in
Bug report
-
Bug DescriptionI'm trying to debug a component unmount/remount issue potentially tied to zustand. In the reproduction link, you can find the example. Open up the console, you will see "Frame is unmounted" and "Frame is mounted" after "calling store.fetch()". If you comment out "store.fetch();", you will see that there is no unmount after "console.log". Version: react 18.3.1, zustand 5.0.5 Reproduction Linkhttps://stackblitz.com/edit/vitejs-vite-jzrntyuz?file=src%2Fmain.jsx |
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Jun 19, 2025
Replies: 1 comment 1 reply
-
|
https://stackblitz.com/edit/vitejs-vite-pqhnmees?file=src%2Fmain.jsx%3AL34 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
heshiming
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackblitz.com/edit/vitejs-vite-pqhnmees?file=src%2Fmain.jsx%3AL34
You forgot
[], didn't you?