So many people tout ReactJS, but is it really good?

I recently made a chat-type application using react. Let me give you my general opinion:

To put it briefly and concisely, the solution of react+redux+immutable+other auxiliary libs is multi-state. , multi-interaction products, there are still many application scenarios, and a picture is worth a thousand words:

The following are some ideas based on my own experience and community experience:

mvvm It is a pattern at the architectural level, and functional is a paradigm in programming. The two are not opposites. React+flux is functional. Functional can also be used in mvvm. FPR is a very important implementation in many mvvm implementation frameworks. Double-binding solution: such as RAC used by ReactiveCocoa. Are there any actual cases to prove that mvvm cannot be used once the application scale becomes large? Do you want your flux? How long has flux been around? Are all the large-scale applications implemented with mvvm fake?

React supporters read directly from the official documents: double-binding is very confusing, and flux can solve everything. The fact is, if you like one-way data flow, mvvm also supports it, just don’t double-bind. .

I have not actually used react, so I will not comment negatively, but what makes me think it is the transparent virtual dom and isomorphic solution is brighter. In terms of performance, ng may not be slower than react, but the disadvantage is that ng needs to know the black magic of track by to achieve optimization, and many developers do not know this. In this regard, react is ahead.

The introduction of virtual dom also separates react from the specific implementation of the view, making it easy to switch the underlying platform. This is a big advantage, and the ng2 architecture can also do this.

React is the view layer. If you are willing, the v in mvvm can also be done with react. Don’t equate mvvm and react casually, thinking that only react can use flux, and that react can only be used for flux. .

To use or not to use? Objective: adapt to local conditions Subjective: vary from person to person Actually: just be happy with it