<Stack.Navigator>
<Stack.Screen name="Home" component={Screens.Home} />
<Stack.Screen name="Blog" component={Screens.Blog} />
</Stack.Navigator>
当我导航到Blog stack
时,此屏幕中的某些事件(例如BackHandler
,open keyboard when focus on Textinput
,...)影响Home screen
。
新屏幕如何在堆栈导航中作为独立屏幕工作?
如果我的问题提出的不正确,请帮助我编辑我的问题
您可以将gestureEnabled属性初始化为false,以防止发生默认的后退事件,其他选项也可以用来禁止本地激活的事件。
如果要删除标题,可以通过将headerMode属性的null归为null来完成