【发布时间】:2020-01-22 18:42:07
【问题描述】:
这是我的路由器层次结构:
<Tabs
key='tabbar'
backToInitial
onTabOnPress={() => {
console.log('Back to initial and also print this');
}}
swipeEnabled
hideNavBar={true}
>
<Scene
title='Profilo'
key='profile'
component={Profile}
tabBarLabel='Profilo'
icon={TabBarIcon}
name='ios-person'
titleStyle={{
fontFamily: 'RobotoRegular',
fontSize: 24,
color: '#00b0ff'
}}
>
<Scene
title='adsf'
key='vehicle'
component={Vehicle}
titleStyle={{
fontFamily: 'RobotoRegular',
fontSize: 24,
color: '#00b0ff'
}}
/>
</Scene>
</Tabs>
如果我在Profilo 页面上并且我不会去Vehicle 页面,我使用Actions.vehicle() 但我收到此错误:
Actions.vehicle() 不是函数
我已经尝试过this solution,但这也不起作用 我该如何解决这个问题?
【问题讨论】:
标签: react-native expo react-native-router-flux