I am trying to change my view backgroundcolor with a button click. But nothing happens(no error).
export default class App extends React.Component{
state = {
color: "#fff"
}
render() {
return(
<View style={{backgroundColor: this.state.color, flex: 1, alignItems:'center', justifyContent:'center',}}>
<Button onClick={() => { this.setState({color: "#00ff00" }) }} title="selam"></Button>
</View>
);
}
};