-
On the docs, It mentioned that zustand states are immutable. Can anyone share docs of internal working of states how exactly state are updated? |
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Sep 6, 2024
Replies: 1 comment
-
state objects are immutable, but the state itself is mutable internally. You can only update it with Line 61 in 4ec7077 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cobra0411
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
state objects are immutable, but the state itself is mutable internally. You can only update it with
setState
.zustand/src/vanilla.ts
Line 61 in 4ec7077