Skip to main content

createStoreUpdates

Callable

  • createStoreUpdates<State, Updates>(atomUpdate: (updateFn: (value: State) => State) => boolean, stateUpdates: Updates): StoreUpdates<State, Updates>

  • Creates StateUpdates for updating the store by provided state mutations


    Type parameters

    • State
    • Updates: Readonly<Record<string, (...args: any[]) => StateMutation<State>>>

    Parameters

    • atomUpdate: (updateFn: (value: State) => State) => boolean
    • stateUpdates: Updates

    Returns StoreUpdates<State, Updates>