UNPKG

redux-thunk

Version:
17 lines (13 loc) 375 B
'use strict'; exports.__esModule = true; exports['default'] = thunkMiddleware; function thunkMiddleware(_ref) { var dispatch = _ref.dispatch; var getState = _ref.getState; return function (next) { return function (action) { return typeof action === 'function' ? action(dispatch, getState) : next(action); }; }; } module.exports = exports['default'];