0
我使用下面的代碼,雖然狀態欄似乎顯示白色文本而不是黑色。任何幫助將是巨大的反應本機狀態欄不顯示黑暗內容
// @flow
import React, { Component } from 'react'
import { View, StatusBar } from 'react-native'
import NavigationRouter from '../Navigation/NavigationRouter'
import { connect } from 'react-redux'
import StartupActions from '../Redux/StartupRedux'
import ReduxPersist from '../Config/ReduxPersist'
// Styles
import styles from './Styles/RootContainerStyle'
class RootContainer extends Component {
componentDidMount() {
// if redux persist is not active fire startup action
if (!ReduxPersist.active) {
this.props.startup()
}
}
render() {
return (
<View style={styles.applicationView}>
<StatusBar barStyle='dark-content' />
<NavigationRouter />
</View>
)
}
}
// wraps dispatch to create nicer functions to call within our component
const mapDispatchToProps = (dispatch) => ({
startup:() => dispatch(StartupActions.startup())
})
export default connect(null, mapDispatchToProps)(RootContainer)