. Advertisement .
..3..
. Advertisement .
..4..
I have tried to run my code, but i get the error _this.setState is not a function. How to fix it? Give me the solution please!
Here is a suggestion for youTypeError: this.setState is not a function
testClick() {
this.setState({ count: this.state.count + 1 })
}
To fix error _this.setState is not a function
I’ve seen this on another forum and this helped me