React Native JavaScript framework stumbles

Airbnb and Udacity bow out of Facebook’s mobile framework while Discord and Walmart forge ahead

React Native JavaScript framework stumbles
Ryan McGuire (CC0)

Once hailed as a breakthrough in mobile development, Facebook’s React Native framework is stumbling, with users reassessing their commitment to the technology and Facebook looking to overhaul it.

React Native has been used at companies like Uber to Tesla, Instagram, and Facebook itself. Late in 2015, analyst firm IDC saw React Native as offering a new paradigm for hybrid development, freeing developers from the Webview component and delivering native performance. React Native opened the native device platform to web developers, said IDC. But IDC did add the caveat that the technology was still immature at the time.

What’s wrong with React Native

React Native lets developers build native mobile apps via JavaScript, leveraging the same design as the React JavaScript UI library. But users have found some issues with the technology:

  • Citing technical problems, including initialization issues and immaturity, in June Airbnb said it would sunset its use of React Native and opt for native apps instead. Organizational issues, including engineers having to debug outside of their expertise, cropped up as well. Many iOS and Android engineers were reluctant to apply for work at Airbnb, given the company’s inclination toward React Native.
  • Udacity has moved away from React Native due to challenges in UI design and integration as well as performance and maintenance.
  • Discord, which provides a text and voice chat app for gamers, found issues with React Native including poor performance of touch events and lack of 64-bit support on Android. But Discord is sticking with React Native, citing its ability to bridge the gap between the web and mobile.

How Facebook is trying to fix React Native

Facebook has moved forward with plans to rearchitect React Native to make it more lightweight and fit better into existing native apps. It also seeks to slim down React Native, to make the framework better into the JavaScript ecosystem.

Facebook found that initial principles of React Native—serving as a single asynchronous, serializable, and batched bridge between JavaScript and native apps—made it harder to build features. The asynchronous bridge, for example, has meant JavaScript logic could not be integrated directly with native APIs expecting asynchronous answers. And  batched bridge-queuing native calls made it more difficult to have React Native apps call into functions implemented natively.

Facebook’s planned changes include:

  • Changing the threading model, to make it possible to call synchronously into JavaScript on any thread for high-priority updates.
  • Addition of async rendering to allow multiple rendering priorities and simplify asynchronous data handling.
  • Simplifying the bridge to make it faster and more lightweight.

Facebook has released Version 0.56 of React Native, meant to be a step toward a more stable framework. It features modernized Android support intended to result in faster builds, as well as an upgrade to the Babel 7 transpiler tool used in React Native’s Metro JavaScript bundler.

Walmart has its own fix: React Native integrator

Not everyone is waiting for Facebook to work out the kinks in React Native. Walmart Labs has built an open source platform, Electrode Native, for integrating React Native components into existing mobile applications. Running on Node.js 6 or later, Electrode Native lets developers select features to add to an application and packages them in a single library. Built-in dependency version control is included to control native dependencies for alignment to React Native components.

In moving to React Native, Walmart had sought a replacement for underperforming hybrid views in the company’s mobile application, which were essentially a browser window inside a mobile app. While the company was pleased with React Native, it found adding new features time-consuming. Also, communication between native parts of an app and React Native was not easy.

Where to download React Native

You can download React Native from GitHub.

Copyright © 2018 IDG Communications, Inc.