pathpunk

A react component based router with most of the functionalities of an SPA router

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
pathpunk
001.1.39 months ago9 months agoMinified + gzip package size for pathpunk in KB

Readme

Pathpunk
!npm packagenpm-imgnpm-url !Downloadsdownloads-imgdownloads-url !Issuesissues-imgissues-url !Code Coveragecodecov-imgcodecov-url
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.