refun
Version:
A collection of React Hook-enabled functions that compose harmoniously with each other. Similar to `recompose`, but:
22 lines (17 loc) • 668 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.StoreContextFactory = void 0;
var _react = require("react");
var _reduxDispatchFactory = require("./redux-dispatch-factory");
var _reduxStateFactory = require("./redux-state-factory");
var StoreContextFactory = function StoreContextFactory(store) {
var Context = (0, _react.createContext)(store);
return {
Context: Context,
mapStoreState: (0, _reduxStateFactory.ReduxStateFactory)(Context),
mapStoreDispatch: (0, _reduxDispatchFactory.ReduxDispatchFactory)(Context)
};
};
exports.StoreContextFactory = StoreContextFactory;
//# sourceMappingURL=store-context-factory.js.map