Cannot transition multiple Transitioning.View using animateNextTransition();
See original GitHub issueSay you want to animate the background behind a switch-router, then you cannot syncronize them using animateNextTransition(), it will only animate the last one you called using this method.
i.e. in this case it will only animate t2 rather than both of them.
this.t1.current.animateNextTransition();
this.t2.current.animateNextTransition();
<View style={{ flex: 1 }}>
<Transitioning.View
ref={this.t1}
pointerEvents="none"
transition={t1}
style={StyleSheet.absoluteFill}
>
{state.index === 1 ? (
<View key="b" style={[StyleSheet.absoluteFill, { backgroundColor: 'red' }]} />
) : (
<View key="b" style={[StyleSheet.absoluteFill, { backgroundColor: 'green' }]} />
)}
</Transitioning.View>
<Transitioning.View
ref={this.t2}
transition={t2}
style={[styles.container, transitionViewStyle]}
>
<SceneView
component={ChildComponent}
navigation={descriptor.navigation}
screenProps={screenProps}
/>
</Transitioning.View>
</View>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8 (2 by maintainers)
Top Results From Across the Web
React native transitioning is not animating - Stack Overflow
Make sure to register react-native-reanimated plugin in your babel.config.js file like this module.exports = { presets: [ .
Read more >Developers - Cannot transition multiple Transitioning.View using ...
Say you want to animate the background behind a switch-router, then you cannot syncronize them using animateNextTransition(), it will only animate the last ......
Read more >Transitions | React Native Reanimated - Software Mansion
In order to have next transition animated you'd need to call animateNextTransition() on the Transitioning.View instance. The second main building block is ...
Read more >react-native-reanimated - npm
This is because Animated.spring({}).start() cannot be used in a ... you'd need to call animateNextTransition() on the Transitioning.View ...
Read more >React Native Reanimated Transitions - Tab Bar and Shuffle ...
Learn How to use React Native Reanimated Transitions to create an animated tab bar and to shuffle a list of images. New To...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We discussed Transitions internally in our team. Considering that v2 makes creating animations easier and Transitions was an experimental API for a long time, we decided to leave Transitions as they are.
We won’t actively fix bugs in them, but we’ll happily merge any PR with fixes. We’re also thinking about rewriting Transitions in v2 sometime in the future.
I’m closing this issue, but if you have further questions, I will be happy to help.
Is this slated for a confirmed issue or is this intended? Moving forward what should be the correct practice?