@abdulghani/routerhelper 中文文档教程
Router helper component
使用配置快速设置路由器
Usage
// other imports
import Router from "@abdulghani/routerhelper";
import myRoutes from "somewhere";
// usage
const RouteApp = () => {
return (
<Router routes={myRoutes} fallback={<>Please Wait</>}>
)
}
// fallback are optional
路由 prop
是这些对象的数组
- path
- exact
- component (able to use react lazy for lazy loading)
Router helper component
to setup router with config quickly
Usage
// other imports
import Router from "@abdulghani/routerhelper";
import myRoutes from "somewhere";
// usage
const RouteApp = () => {
return (
<Router routes={myRoutes} fallback={<>Please Wait</>}>
)
}
// fallback are optional
routes prop
are array of these object
- path
- exact
- component (able to use react lazy for lazy loading)