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
npm install pathpunk
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 />,
},
]}
/>
);
};
Type: MiniRouterProps
Lorem ipsum.
Type: string
Type: Array
Lorem ipsum.