UNPKG

refun

Version:

A collection of React Hook-enabled functions that compose harmoniously with each other. Similar to `recompose`, but:

12 lines (9 loc) 331 B
Object.defineProperty(exports, "__esModule", { value: true }); exports.ReduxDispatchFactory = void 0; var _react = require("react"); const ReduxDispatchFactory = context => dispatchName => props => ({ ...props, [dispatchName]: (0, _react.useContext)(context).dispatch }); exports.ReduxDispatchFactory = ReduxDispatchFactory;