📅  最后修改于: 2022-03-11 15:04:08.288000             🧑  作者: Mango
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 });
}