neux - v0.19.0
    Preparing search index...

    Interface ElementLifecycle

    Lifecycle event handlers for elements, triggered by render.

    interface ElementLifecycle {
        mounted: (this: Node, event: CustomEvent) => void;
        removed: (this: Node, event: CustomEvent) => void;
        updated: (
            this: Node,
            event: CustomEvent<
                { newValue: unknown; oldValue: unknown; property: string },
            >,
        ) => void;
    }
    Index
    mounted: (this: Node, event: CustomEvent) => void

    Fired top-down (this element before its children), the same order as removed, when the element is appended to a parent — on both the initial mount and a re-mount.

    removed: (this: Node, event: CustomEvent) => void

    Fired top-down before cleanup when a children update removes the element from a parent; DOM removals such as el.remove() do not fire it, nor does removing an element that was inserted with DOM APIs into an already mounted parent (such as into a wrapper built with document.createElement() after the wrapper was inserted), which never received mounted. Always paired with mounted: nodes discarded by a reactive re-render are never inserted, so they are disposed internally without firing it.

    updated: (
        this: Node,
        event: CustomEvent<
            { newValue: unknown; oldValue: unknown; property: string },
        >,
    ) => void

    Fired on the bound element after its property value changes; not fired when a re-run resolves to the same value, for the first applied value, or for a change from a cleared (null or undefined) binding. For className, the values are the applied class names; for children, the child nodes in the DOM.