1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-01 07:30:07 +02:00
copilot/spikes/graphs-matrix/chartjs/client/store.js

22 lines
543 B
JavaScript
Raw Normal View History

2016-11-09 15:58:10 +02:00
const createLogger = require('redux-logger');
const promiseMiddleware = require('redux-promise-middleware').default;
const thunk = require('redux-thunk').default;
const redux = require('redux');
const reducer = require('./actions');
const {
createStore,
compose,
applyMiddleware
} = redux;
module.exports = (state = Object.freeze({})) => {
return createStore(reducer, state, applyMiddleware(
2016-11-09 16:10:11 +02:00
createLogger({
predicate: (getState, action) => action.type !== 'UPDATE_STATS'
}),
2016-11-09 15:58:10 +02:00
promiseMiddleware(),
thunk
));
};