Open Evgenyx82 opened 5 years ago
setState solve this. You should write setState directly in componentDidMount or componentWillMount
componenDidMount = () => {
this.setState({width: 500})
}
...
contentCntanierStyle={styles.contentContainer(this.state.width)}
...
const styles = StyleSheet.create({
contentContainer: (width) => ({
height: 1000,
width: width
})
})
try!
Does it possible use dynamic dimensions of width and height?