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

    Function stateAddAt

    • stateAddAt adds an item to a reactive list at a specific index. It creates a new array with the existing items and the new item at the specified index, then updates the state.

      Type Parameters

      • T

      Parameters

      • state: State<T[]>
      • item: T
      • index: number

      Returns void

      const myList = state([]);
      stateAddAt(myList, 'new item', 0);