@embra/reactivity - v0.0.7
    Preparing search index...

    Function combine

    Combine an array of ReadableLikes into a single Readable with transformed value.

    Unlike compute, the signature of the transform function is pure, which makes it easier to use functions that are not aware of the reactive system.

    An array of ReadableLikes to combine.

    Optional pure function that takes multiple values and returns a new value.

    Optional custom Config.

    A OwnedReadable with transformed value.

    import { combine, writable } from "@embra/reactivity";

    const v1$ = writable(0);
    const v2$ = writable(0);

    const combined$ = combine([v1$, v2$], (v1, v2) => v1 + v2);