Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Shopify Engineering 7 min read How-to mediumAdept

How We Built the Add to Favorite Animation in Shop

Shop's Add to Favorite animation, where a product thumbnail pops in, scales, and drops into a bouncing heart tab-bar icon, is built in React Native with Reanimated by driving the whole sequence from a single shared progress value that steps through 1, 2, 3 and so on, each step with its own duration and easing from the motion spec. Each property (opacity, scale, translateY, icon fill and bounce) is mapped from that progress value with clamped interpolation, and the filled heart is a second icon faded in over the outline. Using one shared value guarantees the icon moves the instant the thumbnail disappears, creating a cinematic match cut. An earlier setTimeout-based approach broke that timing when the JS thread was busy; Reanimated's withDelay keeps the timer on the UI thread.

Assumes: React Native basicsanimation easing curves

Related posts

  • Making Your React Native Gestures Feel Natural

    Shopify Engineering mediumAdept

    Draggable UI in React Native feels more natural when gesture end-handling accounts for release velocity, not just finger position. Using the Shop app's bottom Sheet as an example, adding a multiplied `velocityY` to the final position lets quick flicks open or close the sheet. Replacing a fixed 600 ms timing animation with `withSpring` makes the settle animation respect distance and momentum. Dividing drag distance when pulling past the open position adds rubber-band resistance that signals the sheet can't go further.

  • Custom Navigational Transitions in iOS

    Zalando Engineering mediumAdept

    Zalando's iOS app adds a custom zoom-style push transition between backend-driven screens. The tapped outfit card grows into the details view, built on UIKit's UIViewControllerAnimatedTransitioning and a custom navigation delegate. Because the backend-defined UI and the generic deep-link router lack context about the tapped view, the team intercepts the tap to capture its frame and snapshot and passes them through the navigation service. Plain drawHierarchy snapshots pixelated and scaled text badly, so they switched to recursively re-rendering the tapped layout per component, omitting labels and buttons and rendering real image views, which gave crisp transitions reusable across screens.

  • Getting Started with React Native Skia

    Shopify Engineering mediumAdept

    React Native Skia (@shopify/react-native-skia) exposes Google's Skia 2D graphics engine to React Native, giving a cartesian canvas with shapes, paths, shaders and image filters that go beyond what View and react-native-svg handle well. The tutorial covers drawing primitives and paths (via SVG strings or imperative commands like addArc), animating drawings by passing Reanimated shared values directly to Skia components, driving them with Gesture Handler pan gestures on the UI thread for 60-120 FPS interaction, and applying built-in effects like Blur and DashPathEffect. Skia also works in the browser through React Native Web.

  • Management of Native Code and React Native at Shopify

    Shopify Engineering mediumAdept

    Shopify's Point of Sale team kept complex UI such as a draggable, reorderable grid of hundreds of buttons in React Native, fixing performance with fewer re-renders, lazy rendering, memoization and Reanimated 2. Background offline sync jobs were a different story: they froze the app because work in single-threaded JavaScript plus bridge traffic blocked interaction. The team moved that sync engine to a Kotlin Multiplatform library using SQLDelight, Apollo and coroutines, reaching about 95% shared code and cutting initial sync for a medium store from 30+ seconds to 2-3 seconds. The post recommends packaging KMM as a separate library with sandbox apps, sketches the Gradle and Xcode build setup, and notes the steeper learning curve for Swift developers.

  • Lessons From Building Android Widgets

    Shopify Engineering mediumAdept

    Shopify built its Android analytics widgets natively rather than in React Native, because widgets must be built from RemoteViews, which React Native does not support. Widget onUpdate() fires several times per cycle, so a one-minute cache keyed by widget ID removes redundant network calls and incorrect analytics. RemoteViews also append to existing views on each update, which they fixed by calling removeAllViews() before addView(). Charts are drawn from MPAndroidChart as ARGB_8888 bitmaps, relative timestamps were dropped over battery cost, and update flicker is reduced by suppressing updates for 60 seconds after placement and rendering early from cached shared preferences.

The quest for software engineering knowledge.

Look:
Layout: