本篇文章通过分析react-loadable包的源码,手把手教你实现一个react的异步加载高阶组件
1. 首先我们想象中的react异步加载组件应该如何入参以及暴露哪些API?
// 组件应用
import * as React from 'react';
import ReactDOM from 'react-dom';
import Loadable from '@component/test/Loadable';
import Loading from '@component/test/loading';
const ComponentA = Loadable({
loade