使用方法
- 复制安装命令,在自己的智能体环境安装前先检查源码包。
- 从原始文档核对所需工具、凭据和支持的宿主。
- 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/full-stack-skills/react-skills --skill redux开始前需了解
- 安装不包含模型订阅、API 额度或访问文件的权限。
- 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。
When to use this skill
Use this skill whenever the user wants to:
- 用 Redux 管理 React 应用全局状态(store、reducer、action、dispatch)
- 使用 Redux Toolkit(createSlice、configureStore)或经典写法
How to use this skill
- 核心:store、reducer、action、dispatch; useSelector、useDispatch。
- Toolkit:createSlice、configureStore、createAsyncThunk;DevTools 与中间件。
- 参考:https://react-redux.js.org/ 、https://redux-toolkit.js.org/
Best Practices
- 状态扁平、按域切 reducer;action 与 reducer 纯函数。
- 异步用 thunk 或 RTK Query;避免在 reducer 中请求。
Keywords
redux, Redux Toolkit, store, 状态管理, React



