Skip to main content

combineAtoms

Callable

  • combineAtoms<TValues>(sources: [...{ [ K in string | number | symbol ]: Atom<TValues[K]> }[]], options?: ComputeOptions<TValues>): Atom<TValues>

  • Creates a new Atom which takes the latest values from source atoms and combines them into an array.


    Type parameters

    • TValues: unknown[]

    Parameters

    • sources: [...{ [ K in string | number | symbol ]: Atom<TValues[K]> }[]]
    • optionaloptions: ComputeOptions<TValues>

    Returns Atom<TValues>