fridays / next-routes

Universal dynamic routes for Next.js
MIT License
2.47k stars 230 forks source link

Client side links? #130

Closed lkostrowski closed 6 years ago

lkostrowski commented 6 years ago

Hi,

I think I have problem to achieve what I expected from this library

<Link route='blog' params={{slug: 'hello-world'}}>

This part on my side renders blog?slug=hello-world, so "next-style"

Have I configured them wrong or something else?

I made it work using next/link adding as=/blog/my-post which eventually end up as query param.

When I use both next's link and routes.js's link and set route to /blog/my-post I get flash of 404 and then proper render.

How should I configure routes to make them work? Params in readme mean query params or route params?

lkostrowski commented 6 years ago

Ok obviously I figured it out just after submitting this issue, working after 6PM ;)

I was linking to 'page' (from /pages), not "name of route" from routes.js config.

I'm not sure if I am only one confused, but I think you can add to readme more direct example how it evaluates