state-actions

Generate plain-object Redux actions and type constants for chota-react-saga slices.

Updated Apr 27, 2026
One-click install
npx skills add https://github.com/grvpanchal/elegant-opencode --skill state-actions
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: state-actions
Source: https://github.com/grvpanchal/elegant-opencode/tree/main/skills/state-actions
Command: npx skills add https://github.com/grvpanchal/elegant-opencode --skill state-actions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Plain-object Redux actions and type constants for the chota-react-saga template, providing a consistent blueprint to manage CRUD and sync operations across slices.

Core Features & Use Cases

  • Three-phase async action triples for each CRUD operation: <OP><ENTITY>, <OP><ENTITY>SUCCESS, <OP><ENTITY>_ERROR.
  • Upper-SNAKE type constants and hand-written action creators (no RTK) to ensure deterministic dispatch patterns.
  • Co-located type and action definitions within each slice, enabling straightforward reuse and testing.

Quick Start

Import the state-actions module for your slice and dispatch the appropriate action creators (e.g., createTodo, readTodo, updateTodo) in response to user interactions.

Frequently Asked Questions about state-actions

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

FAQPage Schema
How do I define Redux actions for saga-driven state management?▼

Redux actions for saga-driven state management are defined as plain-object action creators and upper-SNAKE type constants, enforcing three-phase async action triples like <OP>_<ENTITY>, <OP>_<ENTITY>_SUCCESS, and <OP>_<ENTITY>_ERROR for deterministic dispatch patterns.

What is the three-phase async action triple pattern in Redux saga?▼

The three-phase async action triple pattern in Redux saga generates three distinct action types per CRUD operation: the initial request, a success response, and an error response, ensuring every asynchronous entity slice update follows a deterministic lifecycle.

Can I use Redux Toolkit to generate actions for a saga pattern instead of hand-writing them?▼

Redux Toolkit is not used; this approach enforces hand-written action creators and plain-object Redux actions without RTK to ensure deterministic dispatch patterns for saga-driven slice-level state management.

What's the best way to structure CRUD operations for entity slices in Redux?▼

The best way to structure CRUD operations for entity slices in Redux is by co-locating upper-case type constants and hand-written action creators within each slice, applying three-phase async action triples for every operation.

Do I need Redux Toolkit to manage slice-level state with redux-saga?▼

You do not need Redux Toolkit; this approach explicitly avoids RTK by using hand-written plain-object action creators and upper-SNAKE type constants to manage slice-level state for redux-saga.

How do I dispatch synchronous operations alongside async CRUD verbs in a Redux slice?▼

Synchronous operations alongside async CRUD verbs are dispatched by defining additional plain-object action creators and type constants within the same entity slice, maintaining co-located definitions for straightforward reuse and testing.