WhoBuilt

Skia Meets React Native: Revolutionizing Mobile UIs and Animations

Sep 26, 2024· 29 min· 948 views·Watch on YouTube

Speaker

Akshat Paul, founder and CDO of Company360, explains how React Native Skia can support mobile graphics and animations at Callstack’s RUC 2024.

Why Skia

Paul describes Skia as an open-source 2D graphics library for drawing shapes, text, and images. He says it powers parts of Android, Chrome, and Flutter, and traces its history from its founding in 2004 to its integration with React Native in 2021.

Where other graphics tools fall short

Paul compares Skia with PNGs, SVGs, Lottie, Reanimated, Gesture Handler, and Three.js. He says static images do not adapt to interaction, embedded Lottie animations cannot be changed in real time, and the other tools have limits for complex mobile 2D graphics.

Drawing and animating with Skia

Paul introduces React Native Skia with the package install command `npm install @shopify/react-native-skia`. His first demo draws a circle, adds a radial gradient to make it look like a sphere, then animates its vertical position and squash using React state and timed updates.

Building a sprinkle effect

Paul walks through a second demo that animates falling sprinkles. Each rounded rectangle gets a position, color, and randomized motion; timing moves it down the screen while computed transformations rotate it around three axes. A pressable title and start button add interaction.

What to explore next

Paul points to shaders as a way to create pixel-level visual effects and suggests combining Skia with React Native Animated and Gesture Handler for interactive experiences. He recommends Shopify’s documentation and blog, the shaders.do playground, Dan’s GitHub examples, and William’s React Native demos.

Takeaways

  • Use Skia when an interface needs interactive 2D graphics that static images or embedded animations cannot provide.
  • A radial gradient can add depth to a basic shape without introducing a separate animation library.
  • Use randomized positions and rotations to make repeated animated elements look less uniform.
  • Combine Skia with gesture handling when graphics need to respond to touch.
  • Explore shaders for visual effects that require control over individual pixels.

Mentioned in this talk

Search inside this talk

What was claimed 12

  • role at
    Akshat Paul is founder and CDO at Company360
    “I'm Akshat Paul, founder and CDO of Company360.”
    YouTube
    Unverified1 source· Talk
  • feature
    Skia: Open-source 2D graphics library for drawing shapes, text, and images
    “Skia is an open-source 2D graphics library that provides powerful and flexible APIs for drawing shapes, text, and images.”
    YouTube
    Unverified1 source· Talk
  • acquired
    Google acquired Skia
    “In 2005, it was acquired by Google”
    YouTube
    Unverified1 source· Talk
  • integrates with
    Skia integrates with Android
    officially integrated as Android's primary graphics engine
    “In 2008, Skia became open source and was officially integrated into Android.”
    YouTube
    Unverified1 source· Talk
  • uses
    core graphics engine
    “Skia also powers Google Chrome and became its core graphics engine in 2008.”
    YouTube
    Unverified1 source· Talk
  • uses
    default rendering engine
    “Skia was officially adopted as Flutter's default rendering engine”
    YouTube
    Unverified1 source· Talk
  • integrates with
    Skia integrates with Apple Metal
    enables efficient rendering on iOS devices
    “In 2018, Skia was also introduced with Apple's Metal API”
    YouTube
    Unverified1 source· Talk
  • feature
    React Native Skia: Lets React Native developers use Skia rendering for complex graphics and animations
    “allowing React Native developers to use Skia's powerful rendering capabilities”
    YouTube
    Unverified1 source· Talk
Show all 12 facts

Related talks