Home  >  Article  >  Web Front-end  >  Is react an mvvm framework?

Is react an mvvm framework?

藏色散人
藏色散人Original
2020-12-21 11:17:388031browse

react is not an mvvm framework, but React can be used as the second V in MVVM, which is View; a distinctive feature of MVVM is two-way binding, while React is one-way data binding; react as a whole is functional The idea is to design the component as a pure component, and the state and logic are passed in through parameters.

Is react an mvvm framework?

Recommended: "react video tutorial"

react is a tool launched by Facebook to build user interfaces JavaScript library. React is mainly used to build UI. Many people think of React as the V (view) in MVC. React has high performance and very simple code logic. More and more people have begun to pay attention to and use it.

React can be used as the second V in MVVM, which is View, but it is not an MVVM framework.

One of the most significant features of MVVM: two-way binding.

React does not have this, it is one-way data binding.

React is a one-way data flow library with state-driven views.

React as a whole is based on functional thinking. Components are designed as pure components, and state and logic are passed in through parameters. Therefore, in react, there is a one-way data flow. It is recommended to combine immutable to achieve data immutability.

The above is the detailed content of Is react an mvvm framework?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Is li an inline element?Next article:Is li an inline element?