synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
23 lines (22 loc) • 555 B
JavaScript
import { jsx as o } from "react/jsx-runtime";
import { createContext as n, useContext as u } from "react";
const t = n(
void 0
), x = ({
children: e,
queryContext: r
}) => /* @__PURE__ */ o(t.Provider, { value: r, children: e });
function C() {
const e = u(t);
if (e === void 0)
throw new Error("useQueryContext must be used within a QueryWrapper");
return e;
}
const c = t.Consumer;
export {
t as QueryContext,
c as QueryContextConsumer,
x as QueryContextProvider,
C as useQueryContext
};
//# sourceMappingURL=QueryContext.js.map