Skip to content

Instantly share code, notes, and snippets.

@agenthunt
Created March 30, 2018 12:01
Show Gist options
  • Save agenthunt/72c13d42fd897df51d0fdf5abab3325e to your computer and use it in GitHub Desktop.
Save agenthunt/72c13d42fd897df51d0fdf5abab3325e to your computer and use it in GitHub Desktop.
...
...
import * as Users from '../stars/users';
const appReducer = combineReducers({
users: Users.rootReducer
});
function* rootSaga(args) {
yield fork(Users.rootSaga, args);
}
const enhancer = composeEnhancers(applyMiddleware(...middlewares));
export default function configureStore() {
const store = createStore(appReducer, {}, enhancer);
sagaMiddleware.run(rootSaga, store.dispatch);
return store;
}
...
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment