fridays / next-routes

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

How can we handle route masking using pushRoute()? #188

Closed ukvaddi closed 1 year ago

ukvaddi commented 6 years ago

I want to handle route masking using pushRoute(). Currently link "href" and "as" become link router, it will become argument to pushRoute() in the api. If I want to pass link "as" value to pushRoute(), how can I do that? Here is my requirement, currently there are multiple components in my page. when the page loads components will get loaded. For each component I have onClick method , which is doing pushRoute() in the behind to create a new route, there fore when you click on component the original page url changes to component url in the page. I do not want to that to happen, I want to retain the original page url and at the same time when we click on component the request has to go to server and component in the page should be updated with new values. I thought of passing href value as component url and as value original page url uisng pushRoute(). But I could not able to find a way to pass like this. Please provide your inputs on this.