title: React Native set style as State
body: <p>I want to use <code>backgroundColor</code> of <code>style1</code> as a state, and change it in the function <code>change()</code>.<br>
  How can I access <code>style1</code>? </p>
  
  <p>My point is to call the function <code>change</code> from another function, making the button change its color to yellow, then change it's colour to blue again after sometime. </p>
  
  <pre><code>export default class App extends Component{ 
    constructor (props){
      super(props);
      this.state = {
        //style1.backgroundColour: blue  //? Can't 
      }
      this.change=this.change.bind(this)
    }
  
    change() {
      this.setState({ style1.backgroundColour: yellow }) //?
    }
  
    render(){
      return (
        &lt;View style={styles.style1} &gt; &lt;/View&gt;
  
      );
    }
  }
  
  const styles = StyleSheet.create({
  
    style1:{
      padding: 5,
      height: 80,
      width: 80,  
      borderRadius:160,    
      backgroundColor:'blue',
    },
  
  });
  </code></pre>