Replies: 1 comment 1 reply
-
IMHO is something like this:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, we're using Zustand in a React application and we need to store some "business logic data" (for lack of a better term, this is data the app will fetch from an API, manipulate, and resubmit) but then there is also some "UI preference data" (light/dark theme, local user settings, etc.)
My first impulse was that these are two completely orthogonal types of information, so they belong in two separate Zustand stores, but then the Zustand documentation says:
Our app is not particularly large, and we'd never (that I can see) need to update both stores as part of one user action, so it doesn't seem like the slice pattern applies here.
What would folks recommend for a situation like this?
Beta Was this translation helpful? Give feedback.
All reactions