Shopify Apr 29, 2022

React Native Skia At Shopify

Article Summary

Christian Falch and William Candillon from Shopify just solved React Native's biggest weakness. They brought Skia (the graphics engine powering Chrome, Android, and Flutter) directly to React Native developers.

Shopify open-sourced React Native Skia to give mobile developers powerful 2D drawing primitives that work consistently across iOS, Android, and Web. The project leverages React Native's new JSI architecture for direct JavaScript-to-native communication and offers both imperative and declarative APIs compatible with Flutter's drawing system.

Key Takeaways

Critical Insight

React Native developers can now access the same production-grade graphics engine that powers Chrome and Android, with a declarative React API that matches Flutter's completeness.

The team hints at powerful new features coming in the next months that they're not ready to reveal yet.

About This Article

Problem

React Native couldn't match the graphical capabilities of design tools like Figma. This left graphic designers and developers struggling to communicate, since developers couldn't build the same UI features that designers created.

Solution

Shopify used React Native's JavaScript Interface (JSI) to expose the Skia API directly. This allowed C++ to communicate between JavaScript and native modules without relying on asynchronous bridge messages.

Impact

Developers can now use advanced drawing primitives like drop shadows, backdrop filters, mesh gradients, and SVG rendering. These features didn't exist in React Native before. The declarative API matches what Flutter offers.

Recent from Shopify

Related Articles