I want to render my view with instances of classes as a model.
I want to render my view with instances of classes as a model.
I wholeheartedly agree.
I liked React's support for function components and hooks are quite a treat, but still I think class components are a far better fit for complex components that have logic and state. I'm seeing all this complex logic being expressed as a convoluted mix of hooks and I can't help myself thinking it would be far cleaner to have a class where this logic was handled eith plan old inversion of control.
OO conflates data and methods, which makes systems harder to test, reason about, and debug, because functions are less pure due to the “hidden” internal state of an object.
It also encourages heavy constructs that can often be replaced with trivial data structures that are much easier to work with.
Let’s not get started on inheritance.
I think OO is widely discredited now, although I do see a few experienced programmers still using it.