Hierarchy

  • ComponentStore

Constructors

Properties

alpine: any
components: any
init: any
initialized: any
logErrors: any
logRegisterFailure: any
registerConstructorAsAlpineData: any

Register a component to Alpine through Alpine.data().

Param

The name of the component (must already be registered to the store.)

getClassData: any
getObjectData: any

Methods

  • Retrieve a registered component constructor.

    Parameters

    • name: string

      The component name

    Returns AlpineComponentConstructor

    ComponentConstructor

    If registered, returns a callable that accepts the component constructor arguments and creates the component object. Returns undefined if not registered.

  • Register a generic object (alpine data) as a component.

    Type Parameters

    • T

    Parameters

    • name: string

      The name of the component (registered to alpine for use with x-data.)

    • component: KnownConstructor<T>

      The function that returns component data.

    Returns void

  • Register a class inheriting from Impl.AlpineComponent as a component.

    Type Parameters

    Parameters

    • component: KnownClassConstructor<T>

      The name/symbol of the class to register as a component.

    • Optional name: string

      The name of the component (registered to alpine for use with x-data.)

    Returns void

Generated using TypeDoc v0.25.1