how to add object in array react native usestate code example Example: usestate array push setTheArray([...theArray, newElement]);