how to add value to array with useState code example Example: usestate array push setTheArray([...theArray, newElement]);