Zustand Skill
When to use
-
Shared client-only state across multiple components.
-
UI coordination state (dialogs, panels, filters, view modes).
Workflow checklist
-
Confirm the state ownership: client-only UI state vs server-synced state.
-
Keep stores small; avoid mixing unrelated concerns.
-
Use selectors to limit rerenders.
-
Avoid putting secrets or privileged data in client stores.
-
SSR: ensure state initialization doesn’t break hydration.