Hacker News new | ask | show | jobs
by joelg 324 days ago
yeah I completely agree, I think there's a whole logic of reasons to using useEffect/useCallback/useMemo that the post didn't acknowledge.

personally, I want to have a comprehensive understanding of exactly when and why each of my components re-renders, and to do that I use hooks and design around referential equality. like you said, it's a kind of documentation, more about organization than performance.

not to say that this way is intrinsically better! just that the style is appealing for its own reasons