react-native-directed-scrollview
react-native-directed-scrollview copied to clipboard
Dynamic width and height of content
Does it possible use dynamic dimensions of width and height?
contentContainer: {
height: 1000,
width: 1000,
}
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!