javascript - Will vuejs move closer to react step by step and eventually be called small react or simplified version of react?
習慣沉默2017-05-19 10:10:35
0
6
906
Nowadays, the most popular front-end mvvm framework is react, and many people feel that You Yuxi intends to align with react, so it is inevitable to have such doubts?
Various so-called “frameworks” now learn from each other’s strengths and weaknesses, and design ideas will converge. Currently Vue uses two-way binding, which is implemented using es5’s Object.defineProperty;
The above picture tells us that the b attribute under the a object defines the getter and setter to hijack the attribute. When the attribute value changes, notify will notify the watch object, and the watch object will notify to the corresponding position on the view for update. , and then we see the update of the view. In turn, when data is entered in the view (such as input), the subscriber watch will also be triggered to update the latest data into the data (a.b in the figure), so that the model data can Real-time response to data changes on the view is a process of two-way binding of data.
And react is a single binding. Just this, the distinction and the thought are different.
They are all different in nature. How to rely on React? Don’t think that because Vue has many more features similar to React, it means you should rely on React. It’s just about learning some good things.
Various so-called “frameworks” now learn from each other’s strengths and weaknesses, and design ideas will converge. Currently Vue uses two-way binding, which is implemented using es5’s
Object.defineProperty
;The above picture tells us that the b attribute under the a object defines the getter and setter to hijack the attribute. When the attribute value changes, notify will notify the watch object, and the watch object will notify to the corresponding position on the view for update. , and then we see the update of the view. In turn, when data is entered in the view (such as input), the subscriber watch will also be triggered to update the latest data into the data (a.b in the figure), so that the model data can Real-time response to data changes on the view is a process of two-way binding of data.
And react is a single binding. Just this, the distinction and the thought are different.
Whatever, who knows what new frameworks will come next. Just meet the needs of the current project.
Vue’s learning cost is lower
What is react
They are all different in nature. How to rely on React? Don’t think that because Vue has many more features similar to React, it means you should rely on React. It’s just about learning some good things.
Conceptually speaking, React is not mvvm at all