fridays / next-routes

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

Add support shallow routing fix #13 #14

Closed HaNdTriX closed 7 years ago

HaNdTriX commented 7 years ago

Background

Next.js added support for Shallow Routing in Version 2.0.0-beta.37. They introduced a third parameter (options). With this PR next-routes will support this param as well.

Docs

Router.pushRoute('about', {foo: 'bar'}, { 
   shallow: true
})

Router.replaceRoute('about', {foo: 'bar'}, { 
   shallow: true
})

https://github.com/zeit/next.js#shallow-routing

Solves

13

fridays commented 7 years ago

That's great, thank you!

jckw commented 6 years ago

Is there any way to use this with the <Link /> component?