Install with npm install --legacy-peer-deps
This repo demonstrates:
-
how a custom server, with a page without getInitialProps, with next-routes incorrectly populate
router.query
- From the index page, click on
Go to "a"
- The console logs:
from A, router.query : {slug: 'hello-world'}
, it works because of client side navigation - Refresh the page
- The console logs:
from A, router.query : {}
, the query shouldn't be empty
- From the index page, click on
-
how a custom server, with a page implemeting getInitialProps, with next-routes correctly populate
router.query
- From the index page, click on
Go to "b"
- The console logs:
from getInitialProps, ctx.query {slug: 'hello-world'}` from B, router.query : {slug: 'hello-world'}
- Refresh the page
- The console logs:
from B, router.query : {slug: 'hello-world'}
, the query is correctly populated
- From the index page, click on