3 ms·
> people complain about not being able to handle all the useEffects, but they probably shouldn't be there in the first place I think this is the crux of the is
by notpachet 3y ago
> people complain about not being able to handle all the useEffects, but they probably shouldn't be there in the first place
I think this is the crux of the issue. One's view of hooks depends a lot on the sorts of codebases they've worked in. Maybe the sun has always shone on you, and you've only ever worked in projects where hooks have been used sparingly and with great consideration.
You're very fortunate if so. I've seen some truly horrific hooks-enabled messes that have had to be outright abandoned because they became too complicated for anyone to understand or debug.
- ervine 3y agoYeah that's a great point. Nothing makes me start really looking closely at a merge request than when a useEffect shows up.
- andix 3y agoMy junior developers started to come to me with the question: how can I do this without useEffect? Because they already know that their PR will be rejected. Usually we can figure it out within a few minutes, and make everything less complicated. People are just way too much thinking imperatively, like decades of OOP thought them (and many of their educators). Most naive useEffects are just masked derived state.