堆栈导航器上的拦截后退按钮

时间:2018-07-18 23:52:26

标签: react-native react-navigation

我知道可以覆盖传递onPress道具的headerLeft,但是如何在按下默认的后退按钮时(仅在某些屏幕中)拦截而不需要定义要分配给headerLeft的新组件?

1 个答案:

答案 0 :(得分:0)

尝试使用react native提供的backhandler

详细了解react native web

相关问题