software-mansion/react-native-reanimated

[Reanimated 3.16.5] App crashed when passing ref created by useAnimatedRef

Opened this issue · 2 comments

Description

This issue only happen when I use react-native-reanimated version 3.16.5. The app crashed when I pass the ref created by useAnimatedRef to AnimatedPagerView (created by Animated.createAnimatedComponent(PagerView) ).

I don't know this issue related to Reanimated or PagerView so I also opened another issue in react-native-pager-view #947

Steps to reproduce

Please reproduce using the snippet below

const AnimatedPagerView = Animated.createAnimatedComponent(PagerView)

export default function PagerViewExample() {
    const ref = useAnimatedRef()

    return <AnimatedPagerView ref={ref} />
}

Snack or a link to a repository

https://github.com/quocluongha/rn-pager-view-with-reanimated

Reanimated version

3.16.5

React Native version

0.76.5

Platforms

Android, iOS

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Fabric (New Architecture)

Build type

Debug app & dev bundle

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

Same here

The issue still persists in 3.16.6

Simulator Screenshot - iPhone 16 Pro Max - 2024-12-22 at 14 26 37