React native and Cordova Ionic that good

Source: Internet
Author: User

React native and Phoengap/cordova ionic that good

What is react?

React is a front-end framework released by Facebook in 2013, and today's react has evolved into a front-end ecosystem that encompasses a multitude of react-based frameworks: Reactjs, Reactcanvas, Reactnativeforios, reactnativeforandroid (mobile app development ty300.com). Thanks to Facebook's strong support and the popularity of many developers, react is favored in the front-end framework.

React's API is very simple, but react's ideas are relatively unique, such as: component development, unidirectional data flow, virtual DOM, can accurately understand the idea of react and use it to complete the development is not easy, now from four dimensions summed up in react development some of the development skills in line with its ideas: component encapsulation, Data streams, event systems, and JSX.

What is Ionic?
Ionic is currently the most promising HTML5 mobile application Development Framework (introductory tutorial qkxue.net). Build your application with SASS, which provides a number of UI components to help developers develop powerful applications. It uses the JavaScript MVVM framework and AngularJS to enhance the application. Provides two-way binding of data, using it as a common choice for Web and mobile developers, based on Angualrjs, Angualrjs's boss is Google


Since its inception, react has been known for its fast rendering speed, especially compared with Angularjs and Emberjs. But others disagree, Boris Dinkevich, chief executive of 500Tech, an Israeli software development firm, recently published a blog post saying that react is not really faster than ANGULARJS.

Let's analyze the React native and Phoengap Ionic.

and the foundation of the react-native build is Reactjs this guy.

As for good, chicken blood or excitement, the third-party framework is a risk, and once Apple and Android platform lock This switch, the third-party framework is still to dead end.

React is thought to be fast because the DOM is slow to operate, and react uses the virtual DOM to avoid manipulating the DOM directly. In fact, Boris that the official does not offer a demo to show how much performance has been improved, and the complexity of the JavaScript that the virtual DOM brings to the data can offset its benefits. After examining two widely disseminated demos demonstrating react and Angularjs ionic comparisons, Boris concludes that the virtual DOM-based framework is no faster than the traditional framework Angularjs ionic.

The first demo you'll see most is from the demo on React.js Conf 2015, which is the contrast between React and AngularJS (DEMO:REACT,ANGULARJS). Boris found that this demo is not fair to Angularjs, because the demo author ignores the basic performance-enhancing statement "track by" in Angularjs. Simply modify a line of code to the original:

Ng-repeat= "(key, DB) in Databases"

Modified to:

Ng-repeat= "(key, DB) in databases track by key"

As you can see, the modified Angularjs demo speed is greatly improved, not slower than the performance of react.

The second demo comes from the demo of Ng-conf 2015, and you can see a significant increase in speed after using react in the angular instructions. But Boris that this comparison is not fair, as it demonstrates react component rendering versus angular rendering and data processing. After choosing to use isolated scope in the angular demo, the results show that the speed difference between the two is small.

Boris's article was hotly debated on Hacker news, and some people thought the authors were exaggerating, that they used react parts in their projects to replace angular, and that others embraced the author's view that react had been over-marketed over the past period, Some demos do not consider the actual situation.

But some people think that speed is not react's selling point, user Feedjoelpie said: React is only very friendly and easy to understand, is virtual DOM makes this possible, while the speed can be acceptable. Dom Diff's goal is not to make react faster than its fellow countrymen, but instead of thinking about DOM, instead of focusing on the global state of your front end.

Summary: Suitable for their own is the best, no matter what others say, do not believe that they have tried to know, in the end that better use.

Ionic react-native and native develop mobile app that's a good contrast post:

React native and Cordova Ionic that good

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.