pathpunk
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

Pathpunk

npm package Downloads Issues Code Coverage

My awesome module Note: This does not replace conventional react routers. Use this when you want a fairly small nagigation system on the same page

Install

npm install pathpunk

Usage

import Pathpunk from 'pathpunk';

const App = () => {
  return (
    <MiniRouter
      name="hobbies"
      routes={[
        { path: '/', component: <HobbiesComponent /> },
        { path: '/hobbies', component: <HobbiesComponent /> },
        {
          path: '/hobbies/[hobbyName]',
          component: <SingleHobbyComponent />,
        },
        {
          path: '/hobbies/:hobbyName',
          component: <SingleHobbyComponent />,
        },
      ]}
    />
  );
};

API

MiniRouter(props: MiniRouterProps): JSX.Element

props

Type: MiniRouterProps

Lorem ipsum.

name

Type: string

routes

Type: Array

Lorem ipsum.

/pathpunk/

    Package Sidebar

    Install

    npm i pathpunk

    Weekly Downloads

    0

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    17.5 kB

    Total Files

    21

    Last publish

    Collaborators

    • emekaorji