UNPKG

@vtaits/react-required-context

Version:

React context that has no default value and must be defined to be used

9 lines (5 loc) 259 B
import * as react from 'react'; import { Context } from 'react'; declare const createContext: <ValueType>() => react.Context<ValueType>; declare const useContext: <ValueType>(context: Context<ValueType>) => ValueType; export { createContext, useContext };