react lazy----延迟加载组件

 const CreateProject = lazy(() => {
   return new Promise(resolve => setTimeout(resolve, 2000)).then(
    () =>import('../common/CreateProject.js')
  )
 })

上一篇:@lazy 解决循环依赖


下一篇:图片懒加载插件实战