Hex Core JS
    Preparing search index...

    Function useRequiredContext

    • 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.

      Type Parameters

      • T

      Parameters

      • context: Context<T>

        The context to use.

      • OptionalcallerName: string

        The name of the caller of this hook (i.e. a hook or component name).

      Returns T