React实战案例 
1. 原理学习 
1.1 并发调度 
javascript
// 并发调度 伪代码
function renderRootConcurrent () {
  do {
    try {
      // 开启任务调度
      workLoopConcurrent();
      break;
    } catch (error) {
      // 错误处理
      handleError(error);
    }
  } while (true)
}1.2 使用 Hooks 实现 componentWillMount 
javascript
// 定义
const useComponentWillMount = (callback) => {
  const willMount = useRef(true)
  if (willMount.current) callback()
  willMount.current = false
}
// 使用
useComponentWillMount(() => {
  console.log('useComponentWillMount')
})