WhoBuilt

Bringing React Native to the next billion devices

Sep 14, 2018· 41 min· 640 views·Watch on YouTube

Speaker

Matt Hargett, principal software engineer at Sony, explains how React Native could reach more devices and improve platform stability at a Callstack tech talk.

React Native beyond mobile

Hargett frames “learn once, write anywhere” around sharing React concepts and JavaScript code across platforms. He says React Native can target Windows desktops, Xbox One, Android TV, web, iOS, and mobile, and argues that Windows reach is about desktop users, not Windows Phone.

The gap in native code sharing

Sharing JavaScript does not automatically share fixes for native bugs, such as Yoga node leaks, view management races, and errors that fail to reject promises. Hargett says platform forks can miss fixes and have uneven native test coverage, making those issues harder to diagnose and maintain.

Share the React Native core

Hargett proposes sharing roughly 30% of native code, including the JavaScript bridge, bundle loader, executor, and core modules, while keeping UI and threading platform-specific. With compatible UI toolkits, he suggests as much as 80% of native code could be shared. He points to Facebook’s cross-platform C++ work and .NET Standard libraries as possible building blocks.

Separate core, interfaces, and UI

Hargett describes how React Native for Windows shares more than 60% of its code across Windows 7, 8, and 10 using shared projects. His .NET Standard core library includes the bridge, bundle loader, promises, timers, and tests, while separate interfaces let platforms provide their own implementations. Keeping the core free of GUI dependencies also makes a headless .NET Core example possible.

Wider reach through shared fixes

Hargett argues that sharing native code can improve both reach and stability by letting platforms receive bug fixes together. He says packaging and dependency inversion can reduce platform fragmentation and reliance on Git submodules. He plans to develop the approach further with Facebook contributors through an RFC.

Takeaways

  • Count desktops, TVs, and set-top boxes when estimating a framework’s potential reach.
  • Track native bugs and test coverage across platforms, not only JavaScript behavior.
  • Share stable core logic and interfaces while leaving UI and threading platform-specific.
  • Use dependency inversion to let platforms adopt shared designs without locking into one implementation.
  • Good packaging can make cross-platform libraries easier to maintain than Git submodules.

Mentioned in this talk

Search inside this talk

What was claimed 10

Show all 10 facts

Related talks