Jos*_*rić 4 react-native react-native-navigation
有没有办法按下标签栏而不渲染组件屏幕?我一直在传递空函数,但它仍然呈现空白屏幕。我希望无论你按什么键,它都会保留在主屏幕上。
将侦听器添加到屏幕。
component={() => null}
listeners={() => ({
tabPress: (e) => {
e.preventDefault(); // Prevents navigation
// Your code here for when you press the tab
},
})}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3799 次 |
| 最近记录: |