Skip to content
Simple utility to build a saga creator
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.npmignore
README.md
package.json
tsconfig.json
yarn.lock

README.md

Redux Saga Creator

A simple utility to convert an object of sagas into a single saga.

Usage

import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import sagaCreator from 'redux-saga-creator';

const sagas = {
    onLogin: function* {},
    onLogout: function* {},
    // etc ...
};

const rootSaga = sagaCreator(sagas);

const sagaMiddleware = createSagaMiddleware();
const store = createStore(
    () => {},
    null,
    applyMiddleware(sagaMiddleware),
);
sagaMiddleware.run(rootSaga);
You can’t perform that action at this time.