how to use react hooks in static arrary code example Example: usestate array push setTheArray([...theArray, newElement]);