Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No animation when transitioning between nested navigators #10

Open
LuisRodriguezLD opened this issue Feb 24, 2019 · 5 comments
Open

No animation when transitioning between nested navigators #10

LuisRodriguezLD opened this issue Feb 24, 2019 · 5 comments

Comments

@LuisRodriguezLD
Copy link

Hello.

I managed to make it work using this fork.

But I have two pages which are not transitions smoothly, I believe the reason is because those pages have a stacknavigator on their own.

Any workaround? Maybe I am doing something wrong. Here is small example.

const AppNavigator = createSwitchNavigator({
	Loading: withTransition(FadeTransition)(loading), // page
	Welcome: withTransition(FadeTransition)(welcome), // page
	LoggedOut: withTransition(FadeTransition)(loggedout), // nav
	LoggedIn: withTransition(FadeTransition)(loggedin), // nav
});

this is how a nav looks

const Navigator = createBottomTabNavigator({
	Home: home,
        ...
})
@elyalvarado
Copy link
Owner

Yes, this has been an issue since the beginning. I fixed some cases in version 0.1.1, and it'll work if you don't wrap the nested navigator in the withTransition HOC. However, there is a caveat: it'll only work when transitioning from/to a wrapped screen, in your case it'll work if you transition from loading to loggedIn, or from welcome to loggedIn. It won't work if you transition between loggedOut and LoggedIn.

@LuisRodriguezLD
Copy link
Author

You are correct. It works precisely as you described.
Do you know a workaround this issue?

@elyalvarado
Copy link
Owner

not yet, the only workaround is what is currently implemented

@elyalvarado elyalvarado changed the title not working if page has a tabnavigator No animation when transitioning between nested navigators Feb 25, 2019
@JeanMonteiro
Copy link

same here!

@mahdinba97
Copy link

same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants