React native 反应导航选项访问道具
如何在React导航选项中实现条件设置React native 反应导航选项访问道具,react-native,react-navigation,React Native,React Navigation,如何在React导航选项中实现条件设置 static navigationOptions = { headerTitle: this.props.moneyContext === 'Send' ? 'Send money' : 'Receive money', }; moneyContext取决于打开什么屏幕并从存储中获取数据 谢谢 您可以尝试使用setParams: navigation.setParams({ param: value }) 有关详细信息,请参阅。这似乎是对的,
static navigationOptions = {
headerTitle: this.props.moneyContext === 'Send' ? 'Send money' : 'Receive money',
};
moneyContext取决于打开什么屏幕并从存储中获取数据
谢谢 您可以尝试使用setParams:
navigation.setParams({ param: value })
有关详细信息,请参阅。这似乎是对的,这里有什么问题或错误?