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

fix: delay ScreenContainer updates in same manner as ScreenStack #1116

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

WoLewicki
Copy link
Member

@WoLewicki WoLewicki commented Sep 9, 2021

Description

Added delayed update logic to ScreenContainer in order to resolve issues with too early detached nested navigators when going back from a screen in native-stack with nested different navigators. This change was part of synchronous fragment updates introduced in #1066. Going back like that triggers removeAllScreens code of the nested navigator and it resolved in detaching all of the child screens before the update of native-stack was dispatched, leading to blank screen from the start of navigation.

Test code and steps to reproduce

Test860.tsx to see that without this change the nested navigators are detached at the start of transition.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@WoLewicki WoLewicki changed the title fix: apply same logic to ScreenContainer fix: delay ScreenContainer updates in same manner as ScreenStack Sep 9, 2021
Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@kacperkapusciak kacperkapusciak merged commit 9c81f28 into master Sep 9, 2021
@kacperkapusciak kacperkapusciak deleted the @wolewicki/fix-sync-nested-navs branch September 9, 2021 10:58
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

Successfully merging this pull request may close these issues.

None yet

3 participants