@nkeff/cardboard-js
    Preparing search index...

    Function stateRemoveWhere

    • 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: T, index: number) => boolean

      Returns void

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