question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot transition multiple Transitioning.View using animateNextTransition();

See original GitHub issue

Say 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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jakub-gonetcommented, Jul 28, 2020

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.

0reactions
serfgycommented, Jul 1, 2020

Is this slated for a confirmed issue or is this intended? Moving forward what should be the correct practice?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found