fridays / next-routes

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

Nested Routes #139

Closed ed-zm closed 6 years ago

ed-zm commented 6 years ago

Hi guys, How can I use nested Routes? lets say I have a /users route which has various subroutes. If I want to go to /users/:id/reservations/events/ how can I do it? as I understand I will have to add it with Router.add(route, page) however I think it will call again the server the new rendered page, but I dont want to call the server again if I am already in /users page.

Any Ideas?

thanks,

Ed

fridays commented 6 years ago

Hey, please see shallow routing: https://github.com/zeit/next.js/blob/canary/readme.md#shallow-routing

It’s the same option when using Router from next-routes