Consider this very basic example.

The problem here is – we relying on React specific patterns for something that could easily be handled natively. Specifically – there is absolutely no need to utilize component state + post render effect when we can simply call the logic in the native event handler passed to button.
Let’s see what that looks like:

Much less code + complexity and much less reliance on React specific mechanics. If this code ever needed to be converted to another library it would now be much simpler.
I would understand if you were reading this thinking – “this is a silly example – no one would ever make this mistake” and I understand it might feel like that for some, but the unfortunate truth is that these kinds of anti-patterns are actually quite common in React codebases, it is easy to fall into this trap.
While doing your self code reviews before asking for peer reviews always ask yourself “Do I need this useEffect?”