• 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

    Example

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

Generated using TypeDoc