Paul Krill
Editor at Large

React Native mobile app framework gets a rewrite

news
Jun 19, 20182 mins

Facebook’s framework will become lightweight and have better native integration

job growth promotion success balloon ladders
Credit: Thinkstock

React Native, Facebook’s framework for building native mobile apps, is to be rearchitected for flexibility and mproved integration with native infrastructure.

The framework, which uses JavaScript and the React UI library, will get a rewrite of many of its internals. Most changes, however, will be under the hood, with existing React Native apps continuing to work with few or no changes.

Rearchitecting the framework to be more lightweight and better fit into existing native apps involves three major internal changes:

  • A change to the threading model. It will be possible to call synchronously into JavaScript on any thread for high-priority updates while keeping low-priority work off the main thread.
  • Addition of async rendering capabilities to allow multiple rendering priorities and simplify asynchronous data handling.
  • Bridge simplification to make it faster and lightweight. Direct calls between native and JavaScript are more efficient and it will be easier to build debugging tools such as cross-language stack traces.

Facebook said that closer integrations will be straightforward after these changes. Currently, it is not possible to incorporate native navigation and gesture-handling for native components such as UICollectionView and RecyclerView, unless complex hacks are used.

Facebook also expressed intentions to slim down React Native to make it better fit with the JavaScript ecosystem. This includes making the VM and bundler swappable.

Facebook noted that initial principles of React Native have made it harder to build some features. These include having a single, asynchronous “bridge” between JavaScript and native development, which has prevented integration between JavaScript logic directly with many native APIs. A batched bridge for queuing native calls means it is harder to have React Native apps call into functions implemented natively. Also, a serializable bridge means there is unnecessary copying instead of direct memory-sharing.

Where to download React Native

You can download React Native from its GitHub repo.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author