effex-monorepo
    Preparing search index...

    Interface RedrawConfig<T>

    Configuration for the redraw control flow (DOM-specific).

    Unlike other control functions, redraw completely recreates its content whenever any of the input Readables change. The render callback must not return errors and can only require Scope and RendererContext (which are provided automatically).

    interface RedrawConfig<T extends Readable<unknown>> {
        animate?: AnimationOptions;
        container?: () => Element<HTMLElement | SVGElement, never, never>;
        render: (
            values: ExtractReadableValue<T>,
        ) => Element<HTMLElement | SVGElement, never, never>;
    }

    Type Parameters

    Index

    Properties

    Optional animation configuration

    container?: () => Element<HTMLElement | SVGElement, never, never>

    Optional custom container element. If not provided, defaults to a div with display: contents.

    render: (
        values: ExtractReadableValue<T>,
    ) => Element<HTMLElement | SVGElement, never, never>

    Function to render the content. Called with current values from all Readables whenever any of them change.