I understand that React can be the 'V' in an MVC, but why can't it be considered an MVC, whereas Angular can be?
-
Not really answering your other portion (as to why react isn't) but this is a good post that explains the angular portion. https://stackoverflow.com/questions/39523713/why-is-angular-called-mv-framework – mwilson Jan 23 '19 at 00:01
-
Not a very deep dive but some basic comparisons in this article. Mostly involving unidirectional data flow in React https://medium.com/of-all-things-tech-progress/understanding-mvc-architecture-with-react-6cd38e91fefd – seanulus Jan 23 '19 at 00:21
-
See also [Why isn't React considered MVC?](https://stackoverflow.com/questions/53729411/why-isnt-react-considered-mvc) – ggorlen May 22 '23 at 01:52
1 Answers
React does not follow the MVC pattern. From Wikipedia:
Model–view–controller is an architectural pattern commonly used for developing user interfaces that divides an application into three interconnected parts. This is done to separate internal representations of information from the ways information is presented to and accepted from the user. The MVC design pattern decouples these major components allowing for efficient code reuse and parallel development.
React do not decouples this three major components. Instead, React allows developers to build encapsulated components which manage their own state, view, etc. Then using composition of these components the developer builds the UI. React focus is on the render and update of this components efficiently.
In the other hand, Angular follow this pattern. (As far as I know which is not much when relates to Angular)

- 541
- 2
- 12