Skip to main content

A Brief History of React Native

Free2019-08-25#Tool#react native history#history of react native#ReactNative history#the birth of react native#React Native演进史

React Native from its inception to the present.

Inception

React Native was born during an internal Facebook hackathon in 2013:

In the essence of Facebook’s hacker culture, React Native started as a hackathon project in the summer of 2013.

(Excerpt from In the beginning: React Native’s roots)

Starting with React

With the large-scale application of React, Facebook increasingly felt the advantages of React and web technologies, hoping that Native development could also Move fast like the Web:

  • Rapid iteration cycle: The Web can have two releases a day, resulting in a shorter product iteration cycle.

  • Immediate testing feedback: Web releases instantly reach users, allowing for immediate results from experiments like A/B tests, accelerating product evolution.

  • Rapid development velocity: Changes take effect simply by refreshing the browser, without waiting to recompile the App.

To achieve this goal, Facebook tried three approaches:

  • WebView: Native provides a Webview container, and business logic is developed using web technologies. The advantage is bringing over the entire web development experience, but constrained by web technologies, the experience cannot compare with Native. It was eventually abandoned because performance and scalability did not meet expectations.

  • Porting React to native: Porting React to a Native implementation—a crazy idea. The iOS version (ComponentKit) was completed in 2015, and the Android version (Litho) was launched in 2017. This allowed Native development to also possess various advantages of React, such as UI predictability and Flexbox layout. However, it failed to meet the original intention of improving development efficiency, as any minor change still required recompilation. Furthermore, this system was not interoperable with Web React, making it impossible to utilize powerful tools built on React within the web ecosystem (such as Relay).

  • Scripting native: Calling Native APIs through JavaScript. It seemed like a perfect solution: it possessed the rapid iteration capability of web development, was not limited to web technologies, and did not depart from the JavaScript ecosystem.

And React Native is the final outcome of this third approach.

2015

At the React.js Conf in January 2015, this internal project was announced for the first time, and it was officially open-sourced at the F8 Conference in May.

Initially, it only supported iOS, but Android support was added in September of the same year.

2016

The support for Microsoft UWP and Samsung Tizen meant that React Native moved from mobile devices to PCs (Win 10), game consoles (Xbox One), smartbands (Gear Fit 2), smart TVs (SUHD), and even holographic glasses (HoloLens).

In addition, development experience, performance, and API capabilities were continuously improved through rapid iterations.

2017

Established a monthly iteration plan and regularly held monthly meetings involving community teams. Performance remained a crucial direction, with significant updates to animations and List Views involving performance optimization.

Additionally, explorations into build-time performance optimization began, such as Prepack, aiming to drastically reduce the initialization time of the React Native core:

We plan to bring the cost of the React Native bridge close to zero via projects like Prepack and more build time processing.

2018

To better support Native & React Native hybrid apps, the core team launched an architecture upgrade plan (Fabric), which included major changes such as refactoring the threading model, supporting React async rendering capabilities, and simplifying the React Native core. At the same time, Facebook also planned to open-source some infrastructure, including JSI; see Open Sourcing Internals and Updated Tooling for details.

On the other hand, the management of the open-source community also became more formalized, including version management, RFCs, communication, and discussions.

2019

With the participation of the open-source community, the architecture upgrade plan progressed rapidly. Some non-core modules were detached from the React Native Core to be maintained independently, with positive results:

These modules are getting more support than they ever did within React Native, showing that this is a great step for the community.

At the same time, performance optimization has never ceased, even switching to Hermes as the JS engine for the Android platform (previously, Android also used JavaScriptCore) to seek further performance improvements:

Hermes is an open-source JavaScript engine optimized for running React Native apps on Android. For many apps, simply enabling Hermes will result in improved start-up time, decreased memory usage, and smaller app size.

References

Comments

No comments yet. Be the first to share your thoughts.

Leave a comment