What is the difference between set vs setState? #2698
-
https://zustand.docs.pmnd.rs/guides/flux-inspired-practice#use-set-/-setstate-to-update-the-store According to Docs, it saids 'Always use set (or setState) to perform updates to your store.' But I can't find difference between set and setState. Why there are two ways to update store(set, setState)? Is there any difference or reason? |
Beta Was this translation helpful? Give feedback.
Answered by
dbritto-dev
Aug 24, 2024
Replies: 1 comment 1 reply
-
@soyoonJ there's no difference between |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
soyoonJ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@soyoonJ there's no difference between
set
andsetState
they're available on different phases,set
is available at store creation andsetState
after store creation