切换到某个页面时才会真正加载该页面。

    • webpack的import API
    • react-loadable库实现异步加载 ```javascript import Loadable from ‘react-loadable’; import Loading from ‘./my-loading-component’;

    const LoadableComponent = Loadable({ loader: () => import(‘./my-component’), loading: Loading, });

    export default class App extends React.Component { render() { return ; } } ```