@next-mini-router/core
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

next-mini-router

Virtual and dynamic routes made simple, like react-router-dom, but with the Next.js way

Installation

npm install @next-mini-router/core

Usage

import { NextMiniRouter, Route } from '@next-mini-router/core'

const Home = () => <h1>Home</h1>
const About = () => <h1>About</h1>
const NotFound = () => <h1>Not Found</h1>

const App = () => (
  <NextMiniRouter defaultState={{...variables }}>
    <Route path="/">
        <Home />
    </Route>
    <Route path="/about">
        <About />
    </Route>
  </Router>
)

Package Sidebar

Install

npm i @next-mini-router/core

Weekly Downloads

2

Version

1.2.0

License

MIT

Unpacked Size

8.88 kB

Total Files

6

Last publish

Collaborators

  • pedrovs3