Skip to main content

Redux-Saga

An intuitive Redux side effect manager.

Easy to manage, easy to test, and executes efficiently.

Asynchronous

ES6 generators make asynchronous flows easy to read, write, and test. Create complex side effects without getting bogged down by the details.

Composition-focused

Sagas enable numerous approaches to tackling parallel execution, task concurrency, task racing, task cancellation, and more. Keep total control over the flow of your code.

Easy To Test

Assert results at each step of a generator or for a saga as a whole. Either way, side effect testing is quick, concise, and painless, as testing should be.

Example Usage

Suppose we have a UI to fetch some user data from a remote server when a button is clicked. (For brevity, we'll just show the action triggering code.)

class UserComponent extends React.Component {
...
onSomeButtonClicked() {
const { userId, dispatch } = this.props
dispatch({type: 'USER_FETCH_REQUESTED', payload: {userId}})
}
...
}

Backers

Support us with a monthly donation and help us continue our activities. Become a backer

Sponsors

Become a sponsor and have your logo shown below and on Github with a link to your site. Become a sponsor