Yes, I think you’re right, there are different restrictions on when useState and setState, though it is worrying seeing confusion straight away about it.
I wonder about a case where there is an expandable panel in a UI, and when expanded it should fetch then display data from a web service. Easy enough to do with this API by splitting the content of the panel out into a second component, but it is going to be very tempting to wrap that useEffect fetch call in an `if (expanded)` condition.
On the other hand, there are lots of positives about this design too, the correctly written code does look very elegant and I can see it solving real problems.