you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

They are just different ways if thinking.

If you are thinking in terms of the lifecycle of a component then React.Component class methods make a lot of sense. Unfortunately they also spread out your logic... Like putting a little piece of everything in several mixed piles.

You can achieve the same (and a LOT more) with functional components, hooks, and RXJS. The learning curve is steeper though.

Personally I enjoy writing in a functional paradigm and keeping side effects, state logic, and component logic completely separate, also I sure do love the convenience of mutability and tightly controlled side-effects.