useContextProvider
Callable
Type parameters
- T
Parameters
displayName: string
The name of the context provider. Used for error messages.
context: Context<T>
The context to use.
Returns NonNullable<T>
The name of the context provider. Used for error messages.
The context to use.
A hook that throws an error if it is used outside of a context provider.