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