Dodawanie do tablicy za pomocą haczyków zasięgu

setMyArray(oldArray => [...oldArray, newElement]);
Inexpensive Impala