UNPKG

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.

20 lines (16 loc) 648 B
import React from "react"; /** * React context for a [`Loading`]{@link Loading} instance. * @kind member * @name LoadingContext * @type {object} * @prop {Function} Provider [React context provider component](https://reactjs.org/docs/context.html#contextprovider). * @prop {Function} Consumer [React context consumer component](https://reactjs.org/docs/context.html#contextconsumer). * @example <caption>How to import.</caption> * ```js * import LoadingContext from "graphql-react/LoadingContext.mjs"; * ``` */ const LoadingContext = React.createContext(); LoadingContext.displayName = "LoadingContext"; export default LoadingContext;