Correct, but the callback passed to useEffect is only scoped to the call stack triggered by the dependency array. So, this makes the callback passed to useEffect dynamically scoped.
With hooks and dependency arrays, similar to dynamically scoped languages, it matters where the function is called.
Thing is, people rarely write functions and use `this` is in dynamically scoped ways anymore. Remember when you had to explicitly bind function scope everywhere? With ES6 and arrow functions, I don't miss that.
Anyway, hooks forces you into that mindset now.