Except useSelector does a strict equality check by default and you can pass a shallow equality comparer function to it for well, shallow comparison just like connect. If any of these techniques result in equality, the hook does not cause a re-render. You do realise that the connect HOC itself is implemented using hooks right? You should read the source code. It's just really easy to use till you figure out hooks.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.