AI AGENT ADDONS

This guide helps you manage app state with the Zustand library. It is for anyone building stores in the LobeHub project. You will learn how to organize actions into public, internal, and dispatch types.

Public actions are for UI components. They handle validation and orchestration. Internal actions contain business logic and use an internal_ prefix. Dispatch methods update the store by calling reducers.

Use optimistic updates to make the app feel fast. Add temporary data first, then sync with the backend. Delete operations should not use optimistic updates. Follow the naming rules for state fields like maps and ID arrays.

Add Zustand skill to your workflow

Global

mkdir -p ~/.claude/skills/zustand

Project

mkdir -p .claude/skills/zustand

Source Repository

Stars
79,191
Forks
15,490
Watchers
79,191
License
NOASSERTION
Last Push
23 days ago
Created
3 years ago