title: React Native - Undefined functions onPress for TextInput
body: <p>I'm trying to make an increment and decrements button in my app and then display the number into my textinput, but for some reason the textinput is not displaying the expected output. I not sure if my button's function has the missing piece or my textinput.</p>
  
  <p><strong>EDIT:</strong> I'm still not sure but my functions: " _incrementCount " and 
  " _decreaseCount ", is undefined in my console.log and in my alert.</p>
  
  <p>And without " string() " I'm having a warning.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>export default class Dishes extends Component {
      constructor(props) {
          super (props)
          this.state = {
              count: 0,
          }
      }
      _incrementCount(index) {
          this.setState({ ['count'+index]: this.state['count'+index] + 1 });
          console.log(this.count);
          alert(this.count);
      }
      _decreaseCount(index) {
          this.setState({ ['count'+index]: this.state['count'+index] - 1 });
          console.log(this.count);
          alert(this.count);
      }
      changeTextHandler(text) {
          this.setState({ ['count'+index]: text });
      };
  
      _renderItem = ({ item, index }) =&gt; {
       return (
          &lt;View&gt;
              &lt;TouchableOpacity
                  onPress = {() =&gt; this._incrementCount(index)}&gt;
                  &lt;Text style = {styles.buttonText}&gt; + &lt;/Text&gt;
              &lt;/TouchableOpacity&gt;
  
              &lt;TextInput
                  onChangeText={ (text) =&gt; this.changeTextHandler(text) }
                  value={ this.state.count }
                  keyboardType = "numeric"
                  placeholder="0"
              /&gt;
  
              &lt;TouchableOpacity
                  onPress = {() =&gt; this._decreaseCount(index)}&gt;
                  &lt;Text style = {styles.buttonText}&gt; - &lt;/Text&gt;
              &lt;/TouchableOpacity&gt;
          &lt;/View&gt;
       )
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ycK5I.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ycK5I.png" alt="enter image description here"></a></p>