Closed fridays closed 7 years ago
Following https://github.com/fridays/next-routes/pull/58 this adds support for unnamed routes.
It assumes a route is unnamed if the first parameter starts with /
/
In this case, the page to render is mandatory and it will throw an error if it's not present.
routes.add('/blog/:slug', 'blog')
<Link route='/blog/hello-world'><a>Click</a></Link>
Following https://github.com/fridays/next-routes/pull/58 this adds support for unnamed routes.
It assumes a route is unnamed if the first parameter starts with
/
In this case, the page to render is mandatory and it will throw an error if it's not present.