Wraps React.useContext to check for properly instantiated context values. Some contexts do not have meaningful default values, so useContext should not be used in a component which is not a descendent of the proper context provider.
React.useContext
useContext
The context to use.
Optional
The name of the caller of this hook (i.e. a hook or component name).
Wraps
React.useContextto check for properly instantiated context values. Some contexts do not have meaningful default values, souseContextshould not be used in a component which is not a descendent of the proper context provider.