React native 反应本机导航[V3],返回上一页
请帮助,我将首先通过显示代码进行解释: home.jsReact native 反应本机导航[V3],返回上一页,react-native,react-native-navigation,React Native,React Native Navigation,请帮助,我将首先通过显示代码进行解释: home.js onHelpPagePress() { Promise.all([ AntDesign.getImageSource('arrowleft', 25) ]).then((sources) => { Navigation.setRoot({ root: { stack: { children: [{ compo
onHelpPagePress() {
Promise.all([
AntDesign.getImageSource('arrowleft', 25)
]).then((sources) => {
Navigation.setRoot({
root: {
stack: {
children: [{
component: {
name: 'projectName.HelpPage',
options: {
topBar: {
title: {
text: 'Screen Name 1',
},
drawBehind: false,
leftButtons: [
{
id: 'backButton',
enabled: true,
showAsAction: 'ifRoom',
component: {
name: 'projectName.Home',
passProps: {
color: 'white',
// pass event here
}
},
icon: sources[0],
color: 'white',
},
],
}
}
},
}]
}
}
});
});
}
看起来是这样的:
------------------------------------
<- Screen Name 1
------------------------------------
------------------------------------
使用navigation.showmodel时已修复。showmodel使用navigation.showmodel时已修复