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)