The
@expo/ui
scrolling components don't let JavaScript control the scroll position, so common behavior like "scroll to top when the active tab is pressed again" isn't possible without workarounds.
Affected components
  • ScrollView
    (universal)
  • Jetpack Compose
    LazyColumn
    and
    LazyRow
  • Column
    and
    Row
    with the
    verticalScroll()
    and
    horizontalScroll()
    modifiers
What's missing
  • ScrollView
    has no
    ref
    .
  • LazyColumn
    has no ref or list-state handle.
  • verticalScroll()
    keeps
    rememberScrollState()
    internal.
  • Other components do expose native methods through a ref, such as
    HorizontalPager
    (
    scrollToPage
    ,
    animateScrollToPage
    ),
    ModalBottomSheet
    and
    TextField
    .
Use case
NativeTabs
in Expo Router scrolls to top on a repeated tab press, but only on iOS. On Android the app needs something to call on the scrollable. The only workaround today is remounting the
ScrollView
with a changing
key
, which gives an instant jump with no animation and resets state inside the content.
Proposed API
```tsx
const ref = useRef<ScrollViewRef>(null);
ref.current?.scrollTo({ x: 0, y: 0, animated: true });
// or
ref.current?.scrollToTop({ animated: true });
<ScrollView ref={ref}>...</ScrollView>
```
For
LazyColumn
, add
scrollToItem(index, { animated })
. If the ref also implements
scrollTo
or
scrollToOffset
, it would work directly with
useScrollToTop
from
expo-router
.
Environment
@expo/ui
~58.0.29,
expo
~58.0.26, Android dev build. I haven't tested the SwiftUI side.