gvergnaud / nextjs-dynamic-routes

[Deprecated] Super simple way to create dynamic routes with Next.js
MIT License
140 stars 7 forks source link

make Router.add() chainable #3

Closed 0xch4z closed 6 years ago

0xch4z commented 6 years ago

To make Router.add() chainable:

const Router = require('nextjs-dynamic-routes')

const router = new Router()

router
  .add({ name: 'Home', pattern: '/' })
  .add({ name: 'Car', pattern: '/car/:make/:model' })

export default router
gvergnaud commented 6 years ago

👍 👍