-
Reload regularly when the network is down
-
example:
import React, { Suspense } from 'react';
import {
Route,
Switch,
Redirect,
} from 'react-router-dom';
import RouterLoader from "./utils/routerLoader.js";
const SuspenseBox = import('@/pages/SuspenseBox');
const List = lazy(() => import('@/pages/list'));
export default function () {
return (
<Suspense fallback={<SuspenseBox />}>
<Switch>
<Route exact path="/">
<Redirect to="/list" />
</Route>
<Route path="/list" exact component={List} />
</Switch>
</Suspense>
)
}
- Contributions: