joyent-portal/legacy/spikes/graphs-matrix/chartjs-whiskers/client/store.js
Sérgio Ramos 8295bd6882 chore: initial lerna setup
this shall be a progressive process
2017-05-25 10:56:50 +01: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
));
};