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

Push animation between screens not working #702

Closed
longprao opened this issue Nov 11, 2020 · 7 comments · Fixed by #714
Closed

Push animation between screens not working #702

longprao opened this issue Nov 11, 2020 · 7 comments · Fixed by #714
Labels
Platform: iOS This issue is specific to iOS
Projects

Comments

@longprao
Copy link

This is the version that was working for me:

    "@react-navigation/bottom-tabs": "^5.10.2",
    "@react-navigation/native": "^5.8.2",
    "@react-navigation/stack": "^5.11.1",
    "react": "17.0.1",
    "react-native": "0.63.3",
    "react-native-screens": "^2.12.0",

I recently updated to this version and on iOS, navigation no longer has any animation, it happens instantly:

    "@react-navigation/bottom-tabs": "^5.11.1",
    "@react-navigation/native": "^5.8.9",
    "@react-navigation/stack": "^5.12.6",
    "react": "17.0.1",
    "react-native": "0.63.3",
    "react-native-screens": "^2.14.0",

I have deleted Podfile.lock and npx pod-install ios, still not work.

When I changed createNativeStackNavigator() to createStackNavigator(), it worked fine again with animation.

Please let me know if it's a bug or what config I need to use to have the slide (push) animation?

@WoLewicki
Copy link
Member

Can you provide a repo/snack with minimal configuration needed to reproduce the issue?

@WoLewicki WoLewicki added Platform: iOS This issue is specific to iOS Missing repro This issue need minimum repro scenario labels Nov 12, 2020
@dylancom
Copy link
Contributor

Same here since I updated from version 2.12. Going to a new screen doesn't show an animation anymore. Navigating back to a screen shows an animation though.

@WoLewicki
Copy link
Member

@dylancom please provide a repo that shows this bug so I can work on it.

@WoLewicki WoLewicki added this to Needs reproduction in Screens Nov 13, 2020
@dylancom
Copy link
Contributor

dylancom commented Nov 13, 2020

@WoLewicki I created a repo that shows the bug (iOS): https://github.com/dylancom/react-native-screens-animation-bug.
If you press on "Go to Details" there is no animation.

It seems to happen when you use the "modal stack" pattern: https://reactnavigation.org/docs/modal#creating-a-modal-stack.
So in my case the RootStack is created with: createStackNavigator and the MainStack with createNativeStackNavigator.
This was working fine before updating from 2.12.

@longprao
Copy link
Author

@dylancom hey thanks for that, I'm using exactly the same thing too.

@WoLewicki WoLewicki removed the Missing repro This issue need minimum repro scenario label Nov 16, 2020
@WoLewicki
Copy link
Member

I tested the reproduction and I can spot this bug too. Until we find the solution, the workaround is to set detachInactiveScreens to false on iOS in the stack navigator.

@WoLewicki
Copy link
Member

@longprao @dylancom can you check if #714 resolves the problem?

@WoLewicki WoLewicki moved this from Needs reproduction to In Progress in Screens Nov 17, 2020
Screens automation moved this from In Progress to Done Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS This issue is specific to iOS
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants