【发布时间】:2018-07-05 14:59:54
【问题描述】:
我有一个带有多个屏幕的 react 本机应用程序。每个组件都有自己的状态栏来定义其颜色(参见代码前组件)。启动应用程序时,会显示正确的颜色,但是当我进入使用另一种颜色(黑色而不是白色,反之亦然)的屏幕时,它会正确更改,但之后在进一步导航时不会再更改。颜色好像只能换一次。
render() {
return (
<View style={theme.container}>
<StatusBar
translucent={false}
backgroundColor={S.COLOR_STATUS_BAR_DARK}
barStyle="dark-content"
/>
{this.props.isFetching || this.props.isSubmitting
? <Spinner />
:
<View style={theme.container}>
{ this.renderAlarms() }
</View>
}
</View>
);
}
我在这里做错了吗?
【问题讨论】: