redux-slice

Create Redux Toolkit slices with typed initial state and action reducers.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Ledger-Wallet-LLC/ledgerwallet --skill redux-slice
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redux-slice
Source: https://github.com/Ledger-Wallet-LLC/ledgerwallet/tree/main/.cursor/skills/redux-slice
Command: npx skills add https://github.com/Ledger-Wallet-LLC/ledgerwallet --skill redux-slice

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides clear guidance on crafting Redux Toolkit slices using createSlice, ensuring consistent patterns across state, reducers, and exports.

Core Features & Use Cases

  • Establish typed initial state and state shape with a clean, maintainable slice structure.
  • Define reducers with PayloadAction types and export actions and the reducer separately for scalable composition.
  • Adopt best practices for registration, selectors, and async handling using extraReducers.

Quick Start

Create a new slice using createSlice with a typed initialState, descriptive name, and exported actions and reducer following the guidelines above.

Frequently Asked Questions about redux-slice

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a strongly typed Redux Toolkit slice with createSlice?

To create a typed Redux Toolkit slice, use createSlice with a strongly typed initialState defined via the satisfies operator, descriptive slice naming, and separate exports for actions and the reducer to ensure state immutability and scalable composition.

What is the best way to structure Redux reducers and actions for feature slices?

The best way to structure Redux feature slices is to define reducers with PayloadAction types and export actions and the reducer separately, allowing for scalable composition and maintainable state management across your frontend application.

How does createSlice handle async actions in Redux Toolkit?

createSlice handles async actions in Redux Toolkit using the extraReducers field, allowing you to compose reducers that respond to async thunks while maintaining immutable state updates and typed action payloads.

Can I use the satisfies operator for initialState in Redux Toolkit?

Yes, you can use the satisfies operator to establish a typed initialState in Redux Toolkit, ensuring your state shape is strongly typed and maintainable while enforcing descriptive slice naming conventions.

Why should I export actions and the reducer separately in createSlice?

Exporting actions and the reducer separately in createSlice standardizes Redux slice creation, ensuring consistent patterns for scalable composition, clear selector registration, and maintainable state updates across feature slices.

How do I compose selectors when building feature slices with Redux Toolkit?

You compose selectors in Redux Toolkit feature slices by adopting best practices for selector registration alongside your exported reducer, ensuring typed state access and maintainable integration with your Redux store.