I am working on a React Native application and use the cross-platform implementation of Navigator. In one case, I have a scene, the “Login” route, and when the user successfully logs in, I want to click on another scene, “Home”.
There are two ways to do this: navigator.immediatelyResetRouteStack([routes.home])and navigator.push(routes.home). In the first implementation, the login script will be unmounted, but I do not get the benefits of scene transition. In the second implementation, I get a transition to the scene, but the entry route will not be unmounted, although I do not need to return to it.
Is there a way to implement the Push and Unmount Previous transition?
source
share