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.
stateAddAt
const myList = state([]);stateAddAt(myList, 'new item', 0); Copy
const myList = state([]);stateAddAt(myList, 'new item', 0);
Generated using TypeDoc
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.