title: React Native Increment State onPress
body: <p>I'm new to learning React / React Native and have run into the following issue. When tapping on the <code>&lt;TouchableWithoutFeedback&gt;</code> element, the view does not increment.</p>
  
  <p>Code below:</p>
  
  <pre><code>class SingleHabit extends Component {
  
    constructor() {
      super();
      this.state = {count: 0};
    }
  
    _incrementCount() {
      this.setState = ({
        count: count + 1
      });
    }
  
    render () {
      return (
        &lt;TouchableWithoutFeedback onPress={ () =&gt; this._incrementCount() }&gt;
          &lt;View
            style= {[
              styles.singleHabit,
              {backgroundColor: this.props.color}
            ]}
          &gt;
            &lt;Text style={styles.habitNameText}&gt;{this.props.text}&lt;/Text&gt;
            &lt;Text style={styles.countText}&gt;{this.state.count}&lt;/Text&gt;
          &lt;/View&gt;
        &lt;/TouchableWithoutFeedback&gt;
      );
    }
  }
  </code></pre>
  
  <p>Also, in the interest of self-learning, if there's anyway you would refactor this (or just simply better ways of doing things), I'd love to hear!</p>