React – uncaught TypeError: Cannot read property ‘setState’ of undefined

This is due to not being bound to this.

In order to bind set = in the constructor:

constructor(props) {

    this.state = {
        count : 1
    }; =;

Currently, you are calling bind. But bind returns a bound function. You need to set the function to its bound value.

Leave a Comment