Answer:
Change this code:
return <View style={[styles.container, backgroundColor: this.state.bg]}/>
for this code:
return <View style={[styles.container, {backgroundColor: this.state.bg}]}/>
5.1m questions
6.7m answers