Fügen Sie neues Element Usestate Array hinzu
setMyArray(oldArray => [...oldArray, newElement]);
Inexpensive Impala
setMyArray(oldArray => [...oldArray, newElement]);