With custom hooks and even in Container and Presentational components Architecture It seems just like controller and views.
Thoughts?
With custom hooks and even in Container and Presentational components Architecture It seems just like controller and views.
Thoughts?
For further actions, you may consider blocking this person and/or reporting abuse
Vladislav V. -
Chase Anderson -
Jaime -
chowderhead -
Top comments (1)
I could see how that mental model works. You could also think of it as a model-view-viewmodel pattern, where your presentation components are your views, and your container components are your viewmodels. In either that example or your own, I'd imagine that Redux, RxJS, or some other service acts as your "model" in this case.
Having said that, It's not entirely correct to say React is "like" MVC. It could support an MVC-like pattern, but you aren't bound to it. React can support a number of design patterns. Depending on who you ask, that's one of its biggest strengths or most glaring weaknesses.