React Navigation: Navigate Back To Root using NavigationActions.reset, goBack and getStateForAction

前端 未结 7 704
灰色年华
灰色年华 2020-12-28 15:05

Say I\'ve navigated through 4 screens in my StackNavigator App and now I want to go back to the first screen. There seems to be three different ways to do this and they do n

7条回答
  •  暖寄归人
    2020-12-28 15:50

    You can do this by using the popToTop method from the Navigation prop. Also, if you are using redux, you should update your Redux integration.

    Hope this helps!

提交回复
热议问题