We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
项目中使用 this.forceUpdate()这个API来达到同步更新state的效果,结果发现会报错;
代码示例:
onOptionCreate(option: Option) { this.state.options.push(option) this.state.optionsCount++ this.state.filteredOptionsCount++ this.forceUpdate() this.handleValueChange() }
去掉这个api改用正常的setState正常不会报错
The text was updated successfully, but these errors were encountered:
No branches or pull requests
项目中使用 this.forceUpdate()这个API来达到同步更新state的效果,结果发现会报错;
代码示例:
去掉这个api改用正常的setState正常不会报错
The text was updated successfully, but these errors were encountered: