this.setState(state => ({ hurryStaffList: state.hurryStaffList.set(item.title,'') }), () => { console.log('this.state.hurryStaffList===',this.state.hurryStaffList); });
react this.setState 可以进行state更新成功后,回调进行查看
最新推荐文章于 2022-10-26 16:44:41 发布
this.setState(state => ({ hurryStaffList: state.hurryStaffList.set(item.title,'') }), () => { console.log('this.state.hurryStaffList===',this.state.hurryStaffList); });