1.1.3 • Published 9 months ago

pathpunk v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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.

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago