mirror of
https://github.com/plankanban/planka.git
synced 2025-08-03 20:45:27 +02:00
Initial commit
This commit is contained in:
commit
36fe34e8e1
583 changed files with 91539 additions and 0 deletions
21
client/src/store.js
Executable file
21
client/src/store.js
Executable 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);
|
Loading…
Add table
Add a link
Reference in a new issue