fridays / next-routes

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

Options Inconsistence #229

Closed jackypan1989 closed 5 years ago

jackypan1989 commented 6 years ago

I wanna update query in the same page, so I have to use shallow option. But the example below shows that inconsistency (only works with routeName)

Routes Config

.add('explore', '/explore', 'mypages/explore')

Work

Router.replaceRoute('explore', { myParams }, { shallow: true })

Not work

Router.replaceRoute('/explore', { myParams }, { shallow: true })
fridays commented 6 years ago

In the second example, use .replace instead of .replaceRoute