gradum-kit - v0.1.0
    Preparing search index...

    Type Alias ReifectObjectData<State, ClassType>

    The bookkeeping a StatefulReifect keeps for one attached object. The object is held weakly, so attaching a reifect does not keep it alive once the rest of the application drops it.

    type ReifectObjectData<
        State extends KeyType,
        ClassType extends object = Element,
    > = {
        object: WeakRef<ClassType>;
        enabled: ReifectEnabledObject;
        lastState?: State;
        resolvedValues?: ReifectObjectComputedProperties<State, ClassType>;
        index?: number;
        total?: number;
        onSwitch?: ReifectOnSwitchCallback<State, ClassType>;
        disposeEffect?: () => void;
    }

    Type Parameters

    • State extends KeyType

      The set of states the reifect can switch between.

    • ClassType extends object = Element

      The type of the attached object.

    Index

    Weak reference to the attached object.

    Which parts of the reifect apply to this object.

    lastState?: State

    The state the object was last switched to.

    resolvedValues?: ReifectObjectComputedProperties<State, ClassType>

    The per-state values resolved for this object, so interpolated configurations are computed once rather than on every switch.

    index?: number

    The object's position among the attached objects.

    total?: number

    How many objects are attached in total.

    Called when this object switches state.

    disposeEffect?: () => void

    Tears down the effect tracking this object's reactive values.