canner
Version:
Build CMS in few lines of code for different data sources
41 lines (36 loc) • 1.19 kB
JavaScript
;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.HOCContext = exports.defaultContext = void 0;
var React = _interopRequireWildcard(require("react"));
var defaultContext = {
query: {},
dataChanged: {},
fetch: function fetch() {
throw new Error('there is no fetch method');
},
subscribe: function subscribe() {
throw new Error('there is no subscribe method');
},
request: function request() {
throw new Error('there is no request method');
},
deploy: function deploy() {
throw new Error('there is no deploy method');
},
reset: function reset() {
throw new Error('there is not reset method');
},
onDeploy: function onDeploy() {
throw new Error('there is not onDeploy method');
},
removeOnDeploy: function removeOnDeploy() {
throw new Error('there is not removeOnDeploy method');
},
updateQuery: function updateQuery() {} // $FlowFixMe: waiting for flow updata the libdef
};
exports.defaultContext = defaultContext;
var HOCContext = React.createContext(defaultContext);
exports.HOCContext = HOCContext;