all files / src/redux/ index.js

100% Statements 16/16
75% Branches 3/4
100% Functions 2/2
100% Lines 15/15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29                    62× 62×   62×      
'use strict';
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.dispatch = exports.store = undefined;
 
var _redux = require('redux');
 
var _reducers = require('./reducers');
 
var _reducers2 = _interopRequireDefault(_reducers);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
var store = (0, _redux.createStore)(_reducers2.default);
 
function dispatch(action) {
  var currentAction = action;
  while (typeof currentAction === 'function') {
    currentAction = action(dispatch);
  }
  return store.dispatch(currentAction);
}
 
exports.default = store;
exports.store = store;
exports.dispatch = dispatch;