An alternative side effect model for Redux apps
open sourceMITself-hostablefree
redux-saga is Redux middleware for side effects such as data fetching and browser storage. Each saga is like a separate thread for side effects, written with ES6 generator functions so asynchronous flows read like synchronous code; sagas start, pause and cancel through ordinary Redux actions, and because they yield plain effect descriptions they're easy to test without mocking. It's an alternative to redux-thunk for complex async flows. MIT licensed.
Problems it solves
- my Redux thunks have turned into callback spaghetti
- cancel an in-flight API request when the user navigates away in a Redux app
- test complicated async flows in Redux without mocking fetch
- debounce or throttle actions that trigger API calls
- coordinate several async steps (login, then load data, then poll) in Redux
Features
- generator-based sagas
- cancellation
- declarative effects
- testable without mocks
- channels
Capabilities
| Has official SDKs | plan not known |
|---|
