• stateRemoveWhere removes items from a reactive list based on a callback function. It filters the list and updates the state with the remaining items.

    Type Parameters

    • T

    Parameters

    • state: State<T[]>
    • cb: ((item, index) => boolean)
        • (item, index): boolean
        • Parameters

          • item: T
          • index: number

          Returns boolean

    Returns void

    Example

    const myList = state([1, 2, 3, 4]);
    stateRemoveWhere(myList, (item) => item % 2 === 0); // Removes even numbers

Generated using TypeDoc