高级前端
react
【Q500】在 React 中如何做好性能优化

在 React 中如何做好性能优化

Issue 欢迎在 Gtihub Issue 中回答此问题: Issue 510 (opens in a new tab)

Author 回答者: buzuosheng (opens in a new tab)

  • 代码分割
  • React.memo()、shouldComponentUpdate()等防止不必要的渲染
  • Fragments避免额外标记
  • 错误边界避免组件在出错时破坏整个应用