• stateAdd adds an item to a reactive list. It creates a new array with the existing items and the new item, then updates the state.

    Type Parameters

    • T

    Parameters

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

    Returns void

    Example

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

Generated using TypeDoc