redux-saga

Provides redux-saga API reference covering effects, channels, watchers, and testing helpers.

6|6|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/intent-hq/cloudlands-fe --skill redux-saga-intent-hq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: redux-saga
Source: https://github.com/intent-hq/cloudlands-fe/tree/main/.agents/skills/redux-saga
Command: npx skills add https://github.com/intent-hq/cloudlands-fe --skill redux-saga-intent-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Agents and developers working with redux-saga often misapply effect semantics, such as calling middleware.run before mounting middleware, confusing fork with spawn, or mishandling channel cleanup. This Skill supplies an accurate, example-driven redux-saga API reference so generated saga code follows correct blocking, cancellation, and concurrency behavior. ## Core Features & Use Cases - Effect and watcher guidance: Covers take, put, call, fork, spawn, race, all, takeEvery, takeLatest, takeLeading, throttle, and debounce with blocking/non-blocking semantics. - Channels and buffers: Documents actionChannel, eventChannel, channel, END, flush, and buffer strategies (none, fixed, expanding, dropping, sliding) with cleanup patterns. - Testing and execution helpers: Explains runSaga, cloneableGenerator, and createMockTask for branch testing and external saga execution. - Use Case: When asked to add a saga that cancels stale search requests, the agent uses takeLatest with correct watcher ownership and cancellation semantics instead of inventing wrapper utilities. ## Quick Start Ask the agent to write a redux-saga watcher that debounces search input actions and cancels in-flight requests using the redux-saga skill.

Frequently Asked Questions about redux-saga

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

FAQPage Schema
How do I set up redux-saga middleware with a root saga?▼

Create the middleware with createSagaMiddleware, mount it via applyMiddleware when creating the Redux store, then call sagaMiddleware.run(rootSaga). Calling run before the middleware is mounted on the store is invalid and a common setup mistake.

What is the difference between fork and spawn in redux-saga?▼

fork creates an attached task: the parent waits for it, child errors bubble up, and cancellation propagates downward. spawn creates a detached task that shares none of the parent's completion, error, or cancellation flow, so use it only for intentional top-level work.

Does takeEvery work with channels instead of action patterns?▼

Yes, takeEvery, takeLatest, takeLeading, throttle, and debounce all accept a Channel in place of a pattern natively. Avoid building wrapper utilities around these helpers unless they add cleanup, typing, or domain-specific value.

How do I handle END and closed channels in redux-saga?▼

take auto-terminates the saga when it receives END from a closed channel, while takeMaybe returns the END object so the saga can handle closure itself. Close channels you own in a finally block and use flush to recover buffered messages during cleanup.

How do I test redux-saga generators without replaying setup?▼

Use cloneableGenerator from @redux-saga/testing-utils to create cloneable generator instances for branch testing, and createMockTask to mock Task objects for fork, join, and cancel flows. Prefer effect-level assertions for small generators.

When should I use runSaga instead of saga middleware?▼

Use runSaga to execute a saga outside Redux middleware by providing a channel for take, a dispatch function for put, and getState for select. It returns the same Task interface as middleware.run, suiting standalone or non-Redux execution.