我正在尝试从外部文件导入createStackNavigator并将其添加到View的ImageBackground中,以便可以从上到下使用通用的背景图像流,但是却遇到类似 TypeError:在导航状态中找不到“路线”
代码:
<View style={styles1}>
<ImageBackground source={{uri: 'https://upload.wikimedia.org/wikipedia/commons/3/36/Hopetoun_falls.jpg' }} style={{width: '100%', height: '100%'}}>
<componentNavigator style={{ backgroundColor: 'transparent' }} navigation={navigation} />
<View></View>
</ImageBackground>
{/*</ImageBackground>*/}
</View >
为了解决我添加的上述问题静态路由器= AccountsNavigator.router; //将其添加到构造函数下方
然后,我得到Connot读取了未定义的属性“路由器”我不确定如何修复它,即使它修复了,也会拍摄背景图片吗?