Passing a function in the useEffect dependency array causes infinite loop
Why is an infinite loop created when I pass a function expression into the useEffect dependency array? The function expression does not alter the component state, it only references it.