1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-12 13:00:04 +02:00
copilot/spikes/graphs-matrix/nvd3/client/store.js
2016-11-10 10:43:22 +00:00

22 lines
543 B
JavaScript

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(
createLogger({
predicate: (getState, action) => action.type !== 'UPDATE_STATS'
}),
promiseMiddleware(),
thunk
));
};