V of MVC
Last updated
Last updated
React in comparison to Angular isn't a complete framework. However we can't say that React.js is only “V” in the MVC. After a closer look, you can actually see that React.js is more than just “V”, it has quite some features of the C (controller) part as well. This is why React is so confusing to understand.
Flux – is highly competitive to MVC. One-way data flow provides maintainability and efficient arrangement of data and DOM elements.
React developers suggested using “virtual DOM” in order to solve performance issue for websites with too dynamic DOM. All changes in a document are made there first, and then React looks for the shortest path to apply them in a real DOM tree. This approach makes the framework fast.
React is fundamentally different than other front-end frameworks in that each asset is made up of many isolated components. Want a button changed across the whole platform? Change it once and voilà it's changed everywhere.
By making the creation, distribution and consumption of isolated reusable components more straightforward, developers are better able to save time by using and creating common abstractions. This is true of both low level elements like buttons and high level elements such as accordions.
React.js uses a special syntax called JSX, which allows to mix HTML with Javascript. Markup and code are composed in the same file. This means code completion gives you a hand as you type references to your component’s functions and variables.
React is significantly more SEO friendly than most JavaScript MVC frameworks. As it is based on a virtual DOM you can use it on the server without needing a headless browser on the server such as Phantom.js to render pages to search engine bots.