react-native-reanimated
package:react-native-worklets
package:Run prebuild to update the native code in the ios
and android
directories.
And that's it! Reanimated 4 is now configured in your Expo project.
Since Expo SDK 50, the Expo starter template includes the Reanimated Babel plugin by default.
When using the React Native Community CLI, you also need to manually add the react-native-worklets/plugin
plugin to your babel.config.js
.
Remove wrapWithReanimatedMetroConfig
from your metro.config.js
.
currentIndex
and totalCount
from useGestureViewerController
useGestureViewerController
no longer returns currentIndex
and totalCount
. Use useGestureViewerState
instead.GestureViewerControllerState
type to GestureViewerState
onIndexChange
proponIndexChange
prop has been removed. Use useGestureViewerState
with useEffect
instead.
Improve gesture prop naming for better developer experience.
enableDismissGesture
→ dismiss.enabled
dismissThreshold
→ dismiss.threshold
resistance
→ dismiss.resistance
animateBackdrop
→ dismiss.fadeBackdrop
useSnap
→ enableSnapMode
enableZoomPanGesture
→ enablePanWhenZoomed
enableZoomGesture
→ enablePinchZoom
enableSwipeGesture
→ enableHorizontalSwipe