·zustand-state-management
</>

zustand-state-management

ovachiever/droid-tings

使用 Zustand 在 React 应用程序中构建类型安全的全局状态。支持 TypeScript、持久中间件、开发工具、切片模式和 Next.js SSR。 在设置 React 状态、从 Redux/Context API 迁移、实现 localStorage 持久性或解决 Next.js 水合错误、TypeScript 推理问题或无限渲染循环时使用。

26安装·0热度·@ovachiever

安装

$npx skills add https://github.com/ovachiever/droid-tings --skill zustand-state-management

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