如题。
如题。
|
also24Mar 5, 2020
1
没有写过 React Native,大致翻了一下文档,RN 官方建议使用的导航插件是 React Navigation。
然后翻看 React Navigation 的文档,似乎找到了解决方式。 这是标准情况下的处理逻辑,只要空栈就能退出: https://reactnavigation.org/docs/nesting-navigators#each-navigator-keeps-its-own-navigation-history Each navigator keeps its own navigation history For example, when you press the back button inside a nested stack navigator, it'll go back to the previous screen inside the nested stack even if there's another navigator as the parent. 这是自定义处理 back 键逻辑的方式: https://reactnavigation.org/docs/custom-android-back-button-handling |
|
2
|
|
3
结贴吧。
|