The difference between cordova and react is: cordova is a hybrid-mode framework used to connect web applications with native mobile functions; React is a JavaScript library used to build user interfaces, focusing more on pages Layers divide pages into different categories, and data changes can respond well to the page.
The operating environment of this tutorial: Windows 10 system, react17.0.1 version, Dell G3 computer.
Cordova
Cordova is a platform for building mobile applications using HTML, CSS and JS. We can think of Cordova as a container for connecting our web applications with native mobile functionality.
Cordova is a hybird mode framework. You can use js to write native app stuff. Cordova itself encapsulates the underlying code of different platforms, thus achieving cross-platform;
It uses js The corfirm mechanism in it is used to realize the communication between js and cordova. This allows front-end developers to realize new skills of writing navtive, and they can also implement extensions to implement their own cordova plug-ins. However, the performance of HTML5 itself depends on the browser, so mobile phones The performance difference of browsers determines the achieved page experience.
React
Let’s talk about react.js. React is a JavaScript library used to build user interfaces. It is a front-end page level implemented by fb during its application. The framework corresponds to the V layer of MVVM. It is different from the focus of angularjs. React focuses more on the page layer. It divides the page into different categories. The changes in the data can respond well to the changes in the page. It is not a large and comprehensive framework. , more like a componentized page framework. Can be used together with jquery, angularjs, etc.
In addition, FB has recently expanded react native on this basis to achieve the effect of native app using react.js. It also adds a pair of wings to js and adds new features to the front-end. Imagination space, currently only ios implementation, I believe there will be android implementation soon.
Recommended learning: "react video tutorial"
The above is the detailed content of What is the difference between cordova and react. For more information, please follow other related articles on the PHP Chinese website!