import React, { lazy, Suspense } from 'react'; import { HashRouter, Route, Switch } from 'react-router-dom';
const Index = lazy(() => import('components/Index')); const List = lazy(() => import('components/List'));
class App extends React.Component { render() { return
<Route path="/index" exact component={props => <Index {...props}/>}/>
<Route path="/list" exact component={props => <List {...props}/>}/>
}
}
function Loading() { return
Loading...
}
export default App;