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
state = { text: 'hello' } setState({ text: 'hello' })
上述代码在没有经过任何优化时(shouldUpdateComponent),依然会执行一次完整的虚拟dom渲染和diff,对脚本性能有影响。在React中只要调用setState就会从组件自身开始去渲染其后代所有子组件并进行diff。React将性能优化都交给用户自己做。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
上述代码在没有经过任何优化时(shouldUpdateComponent),依然会执行一次完整的虚拟dom渲染和diff,对脚本性能有影响。在React中只要调用setState就会从组件自身开始去渲染其后代所有子组件并进行diff。React将性能优化都交给用户自己做。
The text was updated successfully, but these errors were encountered: