× Unhandled Rejection (TypeError): _this2.setState is not a function code example
Example: this.setstate is not a function
Make sure you use arrow functions to correctly bind 'this'
handlePageChange = (page) => {
this.setState({ currentPage: page });
}
This will give you 'this.setstate is not a function'
handlePageChange(page){
this.setState({ currentPage: page });
}