React and simple comparison of Vue

React basic functions of almost read, incidentally, read a little Vue's basic grammar. In fact, in order to better understand them.

Vue 1. function should be more powerful than React, because the Vue not only support the traditional to the main line of html template engine also supports jsx React invention. I did not look carefully vue of jsx, so there is no way to compare it with the pros and cons react, it is unclear whether there are higher-order vue jsx corresponding components, hooks, etc., it is unclear whether there are more cattle vue jsx function.

2. learning difficulty, in fact, react easier to learn. When it comes to online vue and react, react always said learning curve is steep, it is very irresponsible. jsx basically did not introduce any new grammar, syntax only js, how can the learning curve is steep? In contrast vue template engine, you really need to write a new grammar, even if you have the experience of other template engines. Such as v-bind, v-if, v-for, v-module and the like. There are these react js do not require new syntax, js an arrow is equivalent to v-module is a two-way binding. Meanwhile vue also need to calculate introduction of property and property investigation, because there is no way to use html template all js variables, can only put them inside the property is calculated to be used in jsx inside, this is not the thing, js can be resolved . This does not include the time you learn jsx of vue.

3. efficiency, this I can not careful comparison, the documents cited vue words inside:

In Vue applications, dependent components are automatically tracked in the rendering process, so the system can accurately know which components do need to be re-rendered

This is obviously much more free Vue react, react components if you want to stop rendering it useless to do, you need to control yourself, this is indeed react developers a headache.

 

Guess you like

Origin www.cnblogs.com/yy17yy/p/11486690.html