vapor-chamber API reference - v1.16.0
    Preparing search index...

    Type Alias UseCommandStateOptions

    type UseCommandStateOptions = {
        coalesce?: boolean;
    }
    Index
    coalesce?: boolean

    When true, multiple synchronous dispatches within the same microtask are accumulated and the signal is written once via queueMicrotask. Pairs with Vue 3.6.0-beta.12's v-for source coalescing: our side defers the signal write, Vue's runtime coalesces the resulting DOM update into one pass.

    Vue 3.6.0-beta.13: v-for consumers of coalesced state benefit from two additional runtime optimizations — specialized v-for block operations (runtime-vapor: specialize v-for block operations) and reduced v-if branch scope overhead (runtime-vapor: reduce v-if branch scope overhead). Signal writes flushed here land into a faster Vapor runtime patch path.

    Trade-off: 1 microtask of signal latency. Use for arrays consumed by v-for that receive rapid bulk updates (batch dispatch, form field arrays, scroll position lists). Default: false (immediate write per dispatch).