Classes with redux and HOCs were a nightmare, and they didn't create an environment to write clean concise code. That being said useEffect, useMemo and useCallback have always felt like hacks. I would prefer to write a function then call that function, not write a function and have it call itself whenever I call a different function to update a variable. I think I'd have rather just had JS classes be less weird than end up with functions that are more concise but follow mystical magical rules.
10
u/ILikeChangingMyMind Mar 06 '23
Have you tried programming with class-based React code?
I have, and I promise hooks were not a mistake: if they were, we'd all still be using classes.