What is the real purpose of a dependency array in hooks like useEffect and useMemo?
To tell React which values the hook depends on so it knows when to re-run
To manually optimize rendering performance in all cases
To control how often React components are allowed to render
To prevent asynchronous state updates from batching