Repository navigation
Add screen transition animation - #5274
Conversation
|
Is this feature working with the current versions of RNGH and Reanimated ? |
Nope @Bayramito. It is currently only available in "react-native-reanimated": "3.9.0-rc.0" |
|
Could not make it work with the latest versions of Scresns, Reanimated and GH |
|
Hey, yes it's 3.9.0. I was waiting for official release to test this feature... |
|
I didn't try with 3.9.0 but I tried with 3.9.0-rc.0 (pre release of 3.9). It worked pretty smoothly 🚀 Let's try it on 3.9.0-rc.0. If it works then you can move to 3.9.0 (Latest). ✅ If you want then you can follow my guide on this here (Link: https://github.com/anisurrahman072/React-Native-SDK-Research/blob/master/ReactNativeScreen3.30.md) Full output is here too: https://x.com/anis_RNCore/status/1778968599597899891 |
|
Amazing 🚀. But it would be great if you create a separate discussion or ISSUE mate, as it seems a good discussion 💯 |
## Summary This pull request introduces a new feature which adds screen "go back" transition animations based on gestures. The feature is a collaboration between three libraries: `react-native-reanimated`, `react-native-screens`, and `react-native-gesture-handler`. Implementing this feature required changes in both Reanimated and RNScreens. You can find the related pull request in the `react-native-reanimated` repository: [PR 1913](software-mansion/react-native-reanimated#5274). ## Test plan Test example from Example App --------- Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>
## Summary This pull request introduces a new feature which adds screen "go back" transition animations based on gestures. The feature is a collaboration between three libraries: `react-native-reanimated`, `react-native-screens`, and `react-native-gesture-handler`. Implementing this feature required changes in both Reanimated and RNScreens. You can find the related pull request in the `react-native-reanimated` repository: [PR 1913](software-mansion/react-native-reanimated#5274). ## Test plan Test example from Example App --------- Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>

Summary
This pull request introduces a new feature which adds screen "go back" transition animations based on gestures. The feature is a collaboration between three libraries:
react-native-reanimated,react-native-screens, andreact-native-gesture-handler. Implementing this feature required changes in both Reanimated and RNScreens. You can find the related pull request in thereact-native-screensrepository: PR 1913.Dependency requirements:
react-native-reanimated@3.6+react-native-screens@3.28+react-native-gesture-handler@2+A demo of this feature was presented at the RNCK meetup: RNCK Meetup Demo
API Overview
Basic usage
To use this feature, you need to import the
GestureDetectorProviderfromreact-native-screens/gesture-handlerand wrap your navigation container with it. Here's an example:Available gestures:
Preset usage
You can also use preset animations for the transition. Import
ScreenTransitionfromreact-native-reanimatedand specify the desired preset in thetransitionAnimationoption. Example:Available presets:
You don't need to worry about the preset because each gesture is associated with a default transition preset.
Custom Animation
If you want to create a custom animation, you can define your own
AnimatedScreenTransitionobject. Here's an example:screenEdgeGestureTo trigger a gesture that starts from the edge of the screen, you can use the
screenEdgeGestureoption. Example:This means you can trigger a transition with a gesture that starts from the edge of the screen.
Test plan
Test example from Example App