• Retrieves a component from the Component Registry using a specified hook. If no component is found for the hook, a default component is returned.

    Type Parameters

    • N extends string = string

      The type of the hook name, which extends string.

    • C = ComponentRegistry | ComponentType

      The type of the component, which defaults to ComponentType or ComponentRegistry.

    Parameters

    • hook: N

      The name of the hook to retrieve the component for.

    • Optional defaultComponent: ComponentType

      The default component to return if no component is found for the hook.

    Returns C

    The component associated with the hook, or the default component if no component is found.