Skip to content

Instantly share code, notes, and snippets.

@pahund
Last active October 14, 2018 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pahund/5af14b9017f7eb64c0a9e272e5373a1d to your computer and use it in GitHub Desktop.
Save pahund/5af14b9017f7eb64c0a9e272e5373a1d to your computer and use it in GitHub Desktop.
Creating a root Redux Saga for the application
import { all, fork } from 'redux-saga/effects';
import { saga as hackerNews } from '@modular-toolkit/demo-module';
import { saga as home } from './pages/home';
import { saga as about } from './pages/about';
import { saga as contact } from './pages/contact';
const sagas = [hackerNews, home, about, contact];
export default function* rootSaga() {
yield all(sagas.map(saga => fork(saga)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment