UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

23 lines (22 loc) 555 B
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