how to pass numbers of array in function componont using state code example Example: usestate array push setTheArray([...theArray, newElement]);