在react中点击事件里面 setState 时会使this重新定义,所以在点击的函数里面使用this.setState()时会报错this.setState not a function,因此需要提前给点击事件的函数绑定this 相关文章: 2022-12-23 2022-12-23 2021-10-25 2021-12-11 2022-01-23 2021-10-03 2022-12-23 2022-12-23