Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#50049·expo

[expo-router] Apple zoom transition: the source view stops following its ScrollView during the dismissal

Author: matthewzammitCreated Sep 11, 2026Updated Sep 28, 2026
LabelsiOSneeds review📦 expo-routercontributor: externalsdk-57severity: low

Minimal reproducible example

https://github.com/Binderr-Product/expo-router-zoom-scrollview-repro

Summary

<Link.Trigger withAppleZoom> hands UIKit the live native view of the trigger as the zoom source. When that trigger lives inside a ScrollView and the list is scrolled while the dismissal is still animating, the source view does not move with the scroll. It holds its position on screen while its siblings scroll under it and overlap it, then snaps back into place when the animation ends.

The window is the length of the dismissal animation. Scroll a moment later and everything is normal.

This is the example that https://github.com/expo/expo/issues/50042 was missing. That issue was filed as prose and closed by expo-bot for lacking a reproducible example, and the bot's message asked for one in a new issue, so this is that issue.

What you should see

The source card holding still while its neighbour scrolls over it

Five frames of one dismissal, with Slow Animations on. Card 4 is the card that was tapped. Cards 6, 7 and 8 scroll normally. Card 4 holds its position on screen, so Card 5 is swallowed completely: in the first frame Card 6 appears to follow Card 4 directly, and Card 5 only creeps back out as the animation ends. The last frame is after the animation, and the list is correct again.

Steps to reproduce

  1. git clone https://github.com/Binderr-Product/expo-router-zoom-scrollview-repro && cd expo-router-zoom-scrollview-repro && npm install
  2. npx expo run:ios on an iOS 18 or later device or simulator. The API is iOS 18+, so nothing happens below that.
  3. On the simulator, turn on Slow Animations (Debug > Slow Animations, or Cmd-T). The bug lasts only as long as the dismissal, about 350ms, so at full speed it is a blink. It happens at normal speed too, it is just hard to watch.
  4. Tap a card in the middle of the list.
  5. Press Back.
  6. Watch the list behind the dismissal.

The repro's Back button deliberately pops and scrolls the list in the same tick:

typescript
onPress={() => {
  router.back();
  glideList(0, 3000);   // step the list's contentOffset for 3s
}}

Doing it by hand reproduces it too, but you have to start the scroll inside the animation, which is hard to hit on purpose.

Worth knowing if you try to automate this: a useFocusEffect on the list screen is too late. On a native stack pop the list regains focus only once the transition has finished, so a timer started there always runs after the card is back in place and the list looks perfectly clean. We chased false negatives for several hours before spotting that. It is also not scriptable with injected touches, because the list swallows every touch until the transition completes.

Why we think it happens

LinkZoomTransitionEnabler.setupZoomTransition() returns the source's own view to UIKit:

swift
controller.preferredTransition = .zoom(options: options) { _ in
  let sourceInfo = self.sourceRepository?.getSource(
    identifier: self.zoomTransitionSourceIdentifier)
  var view: UIView? = sourceInfo?.view
  if let linkPreviewView = view as? NativeLinkPreviewView {
    view = linkPreviewView.directChild
  }
  guard let view else { ... }
  return view
}

(packages/expo-router/ios/LinkPreview/LinkZoomTransition.swift)

That view is a live, Fabric-managed subview of the scroll view's content view. All children of a scroll view share one content view, so a child cannot move independently of its siblings. For the card to sit still while its siblings scroll, something outside the scroll view has to be positioning it, which is what UIKit is doing for the duration of the zoom.

The usual way to avoid this in a custom UIViewControllerAnimatedTransitioning is to animate a snapshot of the source (snapshotView(afterScreenUpdates:)) inside the transition container and hide the real view, so the real view never leaves its parent. UIViewController.Transition.zoom does not offer that choice, so the question may be whether expo-router can hand UIKit a stand-in rather than the real view, or whether this needs a radar to Apple.

What we ruled out

  • Not usePreventZoomTransitionDismissal. Removing the hook entirely changed nothing, and adding it to the minimal example changes nothing either.
  • Not one component or one screen. Two different card components on two different screens behave identically in our app, and the minimal example above has neither of them.
  • It is the zoom. Dropping withAppleZoom from one of two card components while leaving it on the other gave a clean list and a sticking list in the same session.
  • Not the surrounding app. We bisected our own app against the minimal example, adding one layer at a time: a wrapper View with collapsable={false} around the Link, the card's own overflow: hidden / border / function style, three levels of nesting between the scroll content view and the trigger, a Reanimated Animated.ScrollView with a useAnimatedScrollHandler, headerShown: false with a JS back button, and usePreventZoomTransitionDismissal on the destination. None of them is needed. The bare example reproduces it.
  • Not fixed in later releases. ios/LinkPreview/LinkZoomTransition.swift is byte identical from expo-router 57.0.12 through 57.0.21, as is the whole of build/link/zoom/ and build/link/elements.js.

Impact

Cosmetic and self-correcting, but very visible. It is the first thing a tester notices, and a list of cards is the natural place to reach for this API.

Even a documented note that the source view must not be scrolled during the dismissal would help. We would much rather have a fix, but knowing the constraint is worth a lot.

Environment

  expo-env-info 2.1.0 environment info:
    System:
      OS: macOS 26.3
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 25.2.1 - /opt/homebrew/bin/node
      npm: 11.6.4 - /opt/homebrew/bin/npm
      Watchman: 2026.07.27.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.17.0 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 25.5, iOS 26.5, macOS 26.5, tvOS 26.5, visionOS 26.5, watchOS 26.5
      Android SDK:
        API Levels: 36
        Build Tools: 35.0.0, 36.0.0
        System Images: android-36 | Google APIs ARM 64 v8a
    IDEs:
      Xcode: 26.6/17F113 - /usr/bin/xcodebuild
    npmPackages:
      expo: 57.0.22 => 57.0.22
      expo-router: ~57.0.11 => 57.0.21
      react: 19.2.3 => 19.2.3
      react-dom: 19.2.3 => 19.2.3
      react-native: 0.86.3 => 0.86.3
    npmGlobalPackages:
      eas-cli: 21.4.0
    Expo Workflow: managed

The minimal example above was tested on an iPhone 17 Pro simulator running iOS 26.5. The same behaviour was originally found in our own app, on both the simulator and a physical iPhone.

Expo Doctor Diagnostics

Running 21 checks on your project...
21/21 checks passed. No issues detected!

react-native-screens is held at 4.27.0 rather than the 4.26.x the SDK suggests, because expo-router 57.0.21 needs ^4.27.0 and installing both leaves two copies of a native module. It is in expo.install.exclude for that reason only.

Source: expo/expo

View original on GitHubView discussion on GitHub