full-stack-skills/react-skills

redux

Provides comprehensive guidance for Redux state management including stores, actions, reducers, middleware, selectors, and Redux Toolkit.

Quelltext ansehen

Verwendung

  1. Installationsbefehl kopieren und das Quellpaket vor der Installation in der eigenen Agentenumgebung prüfen.
  2. Benötigte Werkzeuge, Zugangsdaten und Hosts im Original prüfen.
  3. Eingabe und gewünschtes Ergebnis beschreiben und die Ausgabe mit den Quellen abgleichen.
npx skills add https://github.com/full-stack-skills/react-skills --skill redux

Vor dem Start

  • Die Installation umfasst weder Modellabo noch API-Kontingent oder Dateizugriffsrechte.
  • Sterne und Installationen zeigen Aktivität, keine unabhängige Qualitäts- oder Sicherheitsprüfung.
Originales Skill-Dokument

Aus dem Quell-Repository gerendert; Überschriften, Beispiele, Code, Tabellen, Links und Bilder bleiben erhalten.

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

  1. 核心:store、reducer、action、dispatch; useSelector、useDispatch。
  2. Toolkit:createSlice、configureStore、createAsyncThunk;DevTools 与中间件。
  3. 参考: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

Verwandte Aufgaben

aus demselben Repository

Weitere Skills

Alle Skills
full-stack-skills
Community

nextjs

Guidance for Next.js using the official docs at nextjs.org/docs. Use when the user needs Next.js concepts, configuration, routing, data fetching, or API reference details.

Installationen
2
GitHub Stars
2
Aktualisiert
3. Okt.
full-stack-skills
Community

react

Provides comprehensive guidance for React development including components, JSX, props, state, hooks, context, performance optimization, and best practices. Use when the user asks about React, needs to create React components, implement hooks, manage component state, or build React applications.

Installationen
2
GitHub Stars
2
Aktualisiert
3. Okt.
full-stack-skills
Community

react-hooks

Provides comprehensive guidance for React Hooks including useState, useEffect, useContext, useReducer, useMemo, useCallback, custom hooks, and hook patterns. Use when the user asks about React Hooks, needs to use hooks in functional components, create custom hooks, or optimize hook performance.

Installationen
2
GitHub Stars
2
Aktualisiert
3. Okt.
full-stack-skills
Community

react-native

Provides comprehensive guidance for React Native development including components, navigation, native modules, platform-specific code, and mobile app development. Use when the user asks about React Native, needs to create mobile applications, implement React Native components, or work with React Native features.

Installationen
1
GitHub Stars
2
Aktualisiert
3. Okt.