在 componentWillUpdate 中 通过 this.setState 修改状态值,可能会导致死循环,因为会调用 shouldComponentUpdate 可以通过 nextProp.propName = *** 的方式进行修改 相关文章: 2021-05-31 2021-09-12 2021-09-19 2021-07-18 2021-07-25 2022-03-08 2022-12-23 2022-12-23