graphql-react
Version:
A GraphQL client for React using modern context and hooks APIs that’s lightweight (< 4 kB) but powerful; the first Relay and Apollo alternative with server side rendering.
19 lines (13 loc) • 410 B
JavaScript
// @ts-check
import React from "react";
/** @typedef {import("./Cache.mjs").default} Cache */
/**
* [React context](https://reactjs.org/docs/context.html) for a
* {@linkcode Cache} instance.
* @type {React.Context<Cache | undefined>}
*/
const CacheContext = React.createContext(
/** @type {Cache | undefined} */ (undefined)
);
CacheContext.displayName = "CacheContext";
export default CacheContext;