title: How change a variable of a parent in react-native
body: <p>I want to change <code>client = {state:0}</code>
  You can access it by using <code>this.client.state</code></p>
  
  <p>I also have a child which contains a button.
  I'm trying to change this 'state' variable when you press the button.</p>
  
  <p>For some reason everything I find everything on the internet not working for me.
  I've been stuck at it for 5 hours and I think it's time to ask help myself</p>
  
  <pre><code>import React from 'react';
  import { StyleSheet, Text, View, Image, TouchableOpacity } from 'react-native';
  import Home from './Components/Home';
  import Activity from './Components/Activity';
  
  export default class App extends React.Component {
  client = {state:0}
  
    render() {
      if(this.client.state == 0){
          return(
              &lt;View style={{flex: 1}}&gt;
                  &lt;Home /&gt;
                  &lt;Child /&gt;
              &lt;/View&gt;
          );
      } else {
          return(
              &lt;View style={{flex: 1}}&gt;
                  &lt;Activity /&gt;
                  &lt;Child /&gt;
              &lt;/View&gt;
          );
      }
  </code></pre>