zustand-state-management
使用 Zustand 在 React 應用程序中構建類型安全的全局狀態。支持 TypeScript、持久中間件、開發工具、切片模式和 Next.js SSR。 在設置 React 狀態、從 Redux/Context API 遷移、實現 localStorage 持久性或解決 Next.js 水合錯誤、TypeScript 推理問題或無限渲染循環時使用。
SKILL.md
Status: Production Ready ✅ Last Updated: 2025-10-24 Latest Version: zustand@5.0.8 Dependencies: React 18+, TypeScript 5+
CRITICAL: Notice the double parentheses create ()() - this is required for TypeScript with middleware.
✅ Use create ()() (double parentheses) in TypeScript for middleware compatibility ✅ Define separate interfaces for state and actions ✅ Use selector functions to extract specific state slices ✅ Use set with updater functions for derived state: set((state) => ({ count: state.count + 1 })) ✅ Use unique names for persist middleware storage keys
使用 Zustand 在 React 應用程序中構建類型安全的全局狀態。支持 TypeScript、持久中間件、開發工具、切片模式和 Next.js SSR。 在設置 React 狀態、從 Redux/Context API 遷移、實現 localStorage 持久性或解決 Next.js 水合錯誤、TypeScript 推理問題或無限渲染循環時使用。 來源:ovachiever/droid-tings。
可引用資訊
為搜尋與 AI 引用準備的穩定欄位與指令。
- 安裝指令
npx skills add https://github.com/ovachiever/droid-tings --skill zustand-state-management- 分類
- </>開發工具
- 認證
- —
- 收錄時間
- 2026-02-01
- 更新時間
- 2026-02-18
快速解答
什麼是 zustand-state-management?
使用 Zustand 在 React 應用程序中構建類型安全的全局狀態。支持 TypeScript、持久中間件、開發工具、切片模式和 Next.js SSR。 在設置 React 狀態、從 Redux/Context API 遷移、實現 localStorage 持久性或解決 Next.js 水合錯誤、TypeScript 推理問題或無限渲染循環時使用。 來源:ovachiever/droid-tings。
如何安裝 zustand-state-management?
開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/ovachiever/droid-tings --skill zustand-state-management 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code 或 Cursor 中使用
這個 Skill 的原始碼在哪?
https://github.com/ovachiever/droid-tings
詳情
- 分類
- </>開發工具
- 來源
- user
- 收錄時間
- 2026-02-01