Re:Were React hooks a mistake?
by Cthulhu_ on Sunday March 12, 2023 @07:11AM
(#35118757)
The issue is that React was never (as far as I'm aware, please correct me if I'm wrong) encorporated into a full MVC (or similar) framework; its original intent was to be just the V, taking state (the model) and rendering it.
But what happened instead is that people wrote the controller parts into React components as well. In some codebases there's a very clean separation - 'logic' components that handle and manipulate state, and simpler 'view' components that just take props and render something.
But I haven't yet seen a framework that uses React as just a view layer.
But what happened instead is that people wrote the controller parts into React components as well. In some codebases there's a very clean separation - 'logic' components that handle and manipulate state, and simpler 'view' components that just take props and render something.
But I haven't yet seen a framework that uses React as just a view layer.