Hacker News new | ask | show | jobs
by codeptualize 1185 days ago
Departure from class based components was one of the motivations behind hooks, those are:

1. It’s hard to reuse stateful logic between components

2. Complex components become hard to understand

3. Classes confuse both people and machines

See https://legacy.reactjs.org/docs/hooks-intro.html#motivation for details. Agree or not, but it is a very intentional and well motivated direction.

1 comments

Above was OO an based solution to #1, and arguably #2. Many would argue hooks did nothing to solve #2 and may have made things worse.

> Agree or not, but it is a very intentional and well motivated direction.

Agree with problem exists (roughly), disagree on solution.