-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Screens are not cleared when calling navigator.replaceAll #396
Comments
My current workaround is:
Sample code:
But I don't think this is the best way |
What would the |
I believe the solution I've come up with for #402 may also help this issue. |
@hristogochev you can find |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Suppose our rootNavigator is configured with the following
disposeBehavior
field:And it contains the navigation stack:
A -> B -> C
Screen B also contains a nested navigator (for example, this could be a TabScreen) with the stack
B1 -> B2 -> B3
.In turn, within screens B1, B2, B3, there are some view models.
From screen C, we perform a rootNavigator.replaceAll action to screen D.
Current Behavior:
Expected Behavior:
It seems logical to me if ViewModels were cleared as soon as the screen they were attached to disappeared from the navigation stack.
This is a critical issue for building hierarchical navigation. Are there any plans to fix this?
The text was updated successfully, but these errors were encountered: