@abdulghani/routerhelper

1.0.1 • Public • Published

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)

Package Sidebar

Install

npm i @abdulghani/routerhelper

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

3 kB

Total Files

3

Last publish

Collaborators

  • abdulghani