React Native Navigator - transition and disconnection of the previous scene

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?

+4
source share
4

RoutStack - . , , ?

0

navigator.resetTo(route) . , reset .

0

Navigator.resetTo(route) , . , resetTo . a > 0, resetTo , pop!

0

Source: https://habr.com/ru/post/1615828/


All Articles