joyent-portal/legacy/spikes/fuzzy-search/react-selectize/src/store.js

19 lines
465 B
JavaScript
Raw Normal View History

2017-01-04 14:14:51 +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(
createLogger(),
promiseMiddleware(),
thunk
));
};