Tell us which versions you are using:
Duration to 0 on scene should remove transition animation
With duration={0} nothing happens. I also tried with transitionConfig on the desired scene, but it only works when it is on the root scene.
I want to disable transition animation but only for a specific scene, not all of them.
I tried to search some fix and found #2628 but, when it pops, it applies all the transitions of all the scenes I passed through, I mean, if I did Login -> Scene1 -> Scene2 then it will apply Transition from Login-> Transition from Scene 1 -> Transition from Scene 2, instead just one which it is what I want.
duration={0} or transitionConfig on a scene and it won't workIn your transitionConfig, apply CardStackStyleInterpolator.forInitial to the Scenes where you don't want a transition animation
That doesn't resolve my issue :/ @Blapi Like I said before, it only works transitionConfig on the root scene...
I tried this solution from #2628
<Stack
key='root'
hideNavBar
transitionConfig={() => ({
screenInterpolator: (props) => {
const { scene } = props
switch (scene.route.routeName) {
/* case yourKeyScene:
return theAnimationYouWant(props)*/
case 'groups':
return CardStackStyleInterpolator.forVertical(props)
case 'home':
return CardStackStyleInterpolator.forHorizontal(props)
case 'inbox':
return CardStackStyleInterpolator.forFade(props)
default:
return CardStackStyleInterpolator.forInitial
}
}
})}>
But like I said, it works ok when you do push, but when it does pop it makes all the transitions from all scenes you passed through ... and it looks weird.
If there is not transition in push, there will be no transition in pop.
When I gave you the solution, it was working for me as you may expect, and it still works now after testing.
Show me your transitionConfig and the steps of your navigation.
Reviewing my navigation stack, I managed to resolve it at last. It looks like there was something wrong on the way I was nesting my scenes. Anyway I had to put it on my root scene, but at least now works and doesn't look weird.
Thank you so much for your attention @Blapi
Most helpful comment
Reviewing my navigation stack, I managed to resolve it at last. It looks like there was something wrong on the way I was nesting my scenes. Anyway I had to put it on my root scene, but at least now works and doesn't look weird.
Thank you so much for your attention @Blapi