@seedrs/redux-sagas
A package for reusable sagas.
Setup
# With yarn (preferred)
yarn add @seedrs/redux-sagas
npm i @seedrs/redux-sagas --save
Usage
To use the sagas, you can import them as named imports.
For example:
import { takeEvery } from 'redux-saga/effects';
import { apiRequest } from '@seedrs/redux-sagas';
import { GET_BOOKS_REQUEST } from 'constants/books';
import actions from 'actions/books';
const saga = function* () {
yield takeEvery(GET_BOOKS_REQUEST, apiRequest, [
actions.getBooksSuccess,
actions.getBooksFailure
], undefined);
};
export default saga;
For more detailed usage, use the links below: