title: undefined is not an object while getting text from TextInput in Expo project
body: <p>I'm a newbie in RN development and faced with the following problem: when I created RN project with Expo I deleted everything from screen and added necessary components. So, I have a <code>TextInput</code>, which should add data to variable. So, that's why I created property in state:     <code>this.state = {text: ''};</code>, which will keep this data. But when I run project I have this error: <code>undefined is not an object</code>. Here's the code of my screen:</p>
  
  <pre><code>export default function HomeScreen() {
  
      this.state = {text: ''};
  
      return (
  
          &lt;View style={styles.container}&gt;
              &lt;ScrollView
                  style={styles.scrollViewContainer}
                  contentContainerStyle={styles.contentContainer}&gt;
                  &lt;View style={styles.searchContainer}&gt;
  
                      &lt;TextInput
                          placeHolder="Type something!"
                          onChangeText={(text) =&gt; this.setState({text})}
                          value={this.state.text}
                      /&gt;
  
                  &lt;/View&gt;
  
                  &lt;View&gt;
  
                      &lt;Button
                          onPress={Alert.alert("Button pressed!")}
                          title="Search"
                      /&gt;
  
                  &lt;/View&gt;
  
                  &lt;View style={styles.listContainer}&gt;
  
                      &lt;Text&gt;{this.state.text}&lt;/Text&gt;
  
                  &lt;/View&gt;
  
              &lt;/ScrollView&gt;
  
  
          &lt;/View&gt;
      )
          ;
  }
  </code></pre>
  
  <p>So, maybe this question is stupid, but please, explain what the matter and how can I solve this problem. And maybe there are some other moments in code, which should be changed?</p>