# redux-saga/redux-saga

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/redux-saga-redux-saga).**

22,443 stars · 1,936 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/redux-saga/redux-saga
- Homepage: https://redux-saga.js.org/
- awesome-repositories: https://awesome-repositories.com/repository/redux-saga-redux-saga.md

## Description

Redux-Saga is a middleware for managing complex asynchronous flows and side effects in Redux applications. It functions as an asynchronous state orchestrator and side effect manager that uses JavaScript generator functions to coordinate concurrent tasks and long-running background processes tied to a global state store.

The system utilizes a generator-based effect middleware to handle external I/O and API requests outside of the main application logic. It provides a mechanism to start, pause, and cancel multiple asynchronous operations, allowing the application to prevent race conditions and avoid stale state updates.

The project covers the coordination of asynchronous workflows and complex state transitions, including the management of background task lifecycles and the dispatching of updates to the global state. It also provides capabilities for asynchronous task cancellation and the integration of external event sources and output streams.

## Tags

### Software Engineering & Architecture

- [Generator-Based Flow Control](https://awesome-repositories.com/f/software-engineering-architecture/execution-flow-control/generator-based-flow-control.md) — Uses JavaScript generator functions to pause and resume execution while yielding descriptions of side effects.
- [Asynchronous Task Managers](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-task-managers.md) — Manages multiple concurrent asynchronous processes through a scheduler that handles task spawning, joining, and cancellation.
- [Asynchronous Task Orchestrators](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-task-orchestrators.md) — Coordinates concurrent tasks and long-running background processes tied to a global state store.
- [Concurrent Task Runners](https://awesome-repositories.com/f/software-engineering-architecture/concurrent-task-runners.md) — Provides a mechanism to start, pause, and cancel multiple asynchronous operations to prevent race conditions.
- [Declarative Effect Mapping](https://awesome-repositories.com/f/software-engineering-architecture/declarative-effect-mapping.md) — Maps internal functions to external operations via plain objects to ensure business logic remains testable and decoupled.
- [Generator-Based Middleware](https://awesome-repositories.com/f/software-engineering-architecture/middleware-patterns/generator-based-middleware.md) — Implements a pattern for handling external I/O and API requests using ES6 generators within middleware.
- [Programmatic Action Triggers](https://awesome-repositories.com/f/software-engineering-architecture/programmatic-action-triggers.md) — Triggers the start and stop of background processes by reacting to specific dispatched Redux actions.
- [Asynchronous Transition Control](https://awesome-repositories.com/f/software-engineering-architecture/state-transition-models/asynchronous-transition-control.md) — Executes multi-step asynchronous processes requiring conditional logic, pausing, or cancellation based on state changes.

### Web Development

- [Asynchronous Request Managers](https://awesome-repositories.com/f/web-development/asynchronous-request-managers.md) — Coordinates concurrent network operations and background tasks to prevent race conditions and ensure UI data consistency.
- [Effect-Based](https://awesome-repositories.com/f/web-development/middleware/effect-based.md) — Intersects Redux actions to dispatch effect objects that are executed by the middleware and fed back into generators.
- [Side Effect Management Libraries](https://awesome-repositories.com/f/web-development/side-effect-management-libraries.md) — Handles complex asynchronous logic and data fetching for Redux applications using a separate thread model to keep state updates pure.
- [State Update Handlers](https://awesome-repositories.com/f/web-development/state-update-handlers.md) — Sends actions back to the global store after completing asynchronous operations to update the application state. ([source](https://github.com/redux-saga/redux-saga/blob/main/README_ru.md))
- [Asynchronous Cancellation Patterns](https://awesome-repositories.com/f/web-development/asynchronous-state-management/asynchronous-cancellation-patterns.md) — Stops active background processes or pending asynchronous operations to prevent memory leaks and stale state updates. ([source](https://github.com/redux-saga/redux-saga/blob/main/SUMMARY.md))
- [State-Aware Task Control](https://awesome-repositories.com/f/web-development/backend-development/background-task-managers/state-aware-task-control.md) — Starts, pauses, and cancels asynchronous operations using action dispatches while maintaining global state access. ([source](https://github.com/redux-saga/redux-saga#readme))

### Development Tools & Productivity

- [Task Racing](https://awesome-repositories.com/f/development-tools-productivity/asynchronous-task-processing/task-racing.md) — Coordinates multiple competing asynchronous requests by resolving the first to complete and cancelling all others.

### Part of an Awesome List

- [GUI Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/gui-frameworks.md) — Side effect management library for Redux applications.
