WhoBuilt

Extending React Native To The Next Platform

Oct 21, 2020· 24 min· 1.1K views·Watch on YouTube

Speaker

Kudo Chien, a React Native enthusiast at CloudMosa and creator of React Native V8, presents a proof of concept for extending React Native with Skia at React Native EU 2020.

Why add another React Native platform

Chien notes that React Native already supports iOS, Android, Windows, and macOS, while some community platforms had fallen behind. He argues that JSI, TurboModules, and Fabric could make out-of-tree platforms easier to build and maintain.

A minimal Skia proof of concept

Chien explores whether React Native could draw its interface with Skia, as Flutter does, instead of relying on native views. His proof of concept targets only views, images, and text, avoids interaction and animation, and aims to work across platforms without patching React Native.

Building the runtime and modules

The prototype combines a Skia app host with a React Native instance, using libuv for its event loop and JSI to create the JavaScript runtime. Chien uses Buck for React Native and prebuilt Skia libraries generated with GN and Ninja. He adds TurboModules, including placeholder modules, so JavaScript can find the platform APIs it expects.

Connecting Fabric to Skia drawing

Chien describes setting up Fabric’s scheduler, component registry, and mounting manager, then mapping Shadow View properties and Yoga-computed layout metrics to Skia drawing commands. The demo renders a background, the React logo, and text reading “React Native loves Skia.”

What remains before production

The prototype lacks networking and WebSocket support, updates for changed view properties, input handling, hit testing, and animation. Chien also says Skia needs a layer system and compositor, and cautions that performance must be measured rather than inferred from Skia’s use.

Takeaways

  • Treat out-of-tree support as an architecture and maintenance problem; JSI and Fabric can reduce platform-specific work.
  • A focused prototype can test a cross-platform rendering idea with just views, images, and text.
  • Choose build tools around real dependency constraints: Fabric needed Buck features, while Skia libraries could be generated with GN and Ninja.
  • Rendering a first frame is only a starting point; input, updates, animation, and compositing are substantial parts of production readiness.
  • Measure performance on the actual implementation before attributing speed to a rendering library.

Mentioned in this talk

Search inside this talk

What was claimed 16

Related talks