push-méthod-in-react-hooks-usestate

const [theArray, setTheArray] = useState(initialArray);

setTheArray(theArray => [...theArray, newElement]);
Lovely Locust