refun
Version:
A collection of React Hook-enabled functions that compose harmoniously with each other. Similar to `recompose`, but:
10 lines • 418 B
JavaScript
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { useContext } from 'react';
export var ReduxDispatchFactory = function ReduxDispatchFactory(context) {
return function (dispatchName) {
return function (props) {
return Object.assign({}, props, _defineProperty({}, dispatchName, useContext(context).dispatch));
};
};
};
//# sourceMappingURL=redux-dispatch-factory.js.map