Skip to content

Performance

Live demo. Swipe it, tap it.Open full screen ↗

60 photos in a Tinder stack with JS and UI thread probes.

  • Only windowSize pages on each side are rendered; the rest of data costs nothing.
  • Gesture, snapping, effects and dots run on the UI thread. React re-renders only when the nearest page changes.
  • The Skia filters are created only while a transition is in progress. At rest the layer is a plain image draw.
  • Keep images close to the size they are shown at. A 4000 px photo blurred every frame is expensive on older Android phones; lower liquid.blur helps too.