WhoBuilt

Multiplatform Aspect of React Native

Mar 12, 2021· 21 min· 275 views·Watch on YouTube

An unnamed Microsoft representative on the React Native EU 2020 Conference Q&A panel discusses code sharing across React Native platforms, adapting apps to desktop, React Native Skia, and the upkeep of platform forks with the host and other panelists.

Sharing code across platforms

Panelists say JavaScript data layers and much of the UI can carry across mobile, web, and desktop. One example reached about 50 percent code sharing across desktop, web, and Android. They caution that shared code still needs platform-specific work so apps feel at home on each device.

Desktop needs its own interactions

The Microsoft representative points to desktop needs that mobile-first React Native did not yet cover well, including mouse-over feedback, drag and drop, and multiple windows. Their team had maintained a React Native Windows product on WPF, but it was no longer maintained because they needed to support Windows 7.

React Native Skia and Flutter

Panelists discuss whether a Skia renderer and synchronous execution could make React Native more appealing to Flutter developers. One describes React Native Skia as an early experiment for learning Fabric and extending React Native to another rendering platform, with key work still needed before it could be production-ready. Another argues that synchronous drawing helps respond to user input, while asynchronous work suits slower tasks such as network requests.

Keeping platform forks current

The Microsoft representative says React Native Windows uses automatically reapplied patches and is updated weekly, while macOS changes are merged manually and the project lags behind. Windows also uses a TypeScript-based Codegen parser and a different TurboModules API, which Microsoft is discussing with Facebook. The panel considers a future structure with a shared React Native core and separate platform implementations.

Takeaways

  • Plan for platform-specific UI and interactions even when data and much of the code can be shared.
  • Treat code sharing as an opportunity, not a promise of identical behavior across platforms.
  • Match execution to the task: responsive drawing for user input, asynchronous work for slower operations.
  • Keep platform forks easier to maintain with small, regularly reapplied patches and frequent upstream updates.
  • Align fork-specific APIs with upstream early to reduce the cost of maintaining separate implementations.

Mentioned in this talk

Search inside this talk

What was claimed 12

Show all 12 facts

Related talks