5.0.2 can not return a state array #2930
Answered
by
dai-shi
cathaysia
asked this question in
Bug report
-
Bug DescriptionWhen upgrade from 4.5.5 to 5.0.2, return a array of a state will result react infinity rendering: const [count, inc] = useStore((state) => [state.count, state.inc]); Reproduction Link |
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Jan 2, 2025
Replies: 1 comment
-
Please check out the migration guide. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cathaysia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please check out the migration guide.
zustand/docs/migrations/migrating-to-v5.md
Line 93 in 2e6d881