1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-08-03 20:45:27 +02:00

Initial commit

This commit is contained in:
Maksim Eltyshev 2019-08-31 04:07:25 +05:00
commit 36fe34e8e1
583 changed files with 91539 additions and 0 deletions

21
client/src/store.js Executable file
View file

@ -0,0 +1,21 @@
import { applyMiddleware, createStore } from 'redux';
import createSagaMiddleware from 'redux-saga';
import { routerMiddleware } from 'connected-react-router';
import rootReducer from './reducers';
import rootSaga from './sagas';
import history from './history';
const sagaMiddleware = createSagaMiddleware();
const middlewares = [sagaMiddleware, routerMiddleware(history)];
if (process.env.NODE_ENV !== 'production') {
const { logger } = require('redux-logger'); // eslint-disable-line global-require
middlewares.push(logger);
}
export default createStore(rootReducer, applyMiddleware(...middlewares));
sagaMiddleware.run(rootSaga);