how to make array of hooks code example
Example 1: usestate array push
setTheArray([...theArray, newElement]);
Example 2: add object to array react hook
setTheArray([...theArray, newElement]);
setTheArray([...theArray, newElement]);
setTheArray([...theArray, newElement]);