rsnext/test/integration/dynamic-routing/pages/blog/$post/comment/$id$.js
Joe Haddad e27203f89b Dynamic routing mark 2 (#7432)
* Update escape string regexp operators

* temp

* Extract getRouteRegex func

* First iteration of dynamic routing for production only

* Correctly order prod

* Add serverless support

* Single line it

* noop routes

* Format doc

* Fix dynamic routing for dev

* Add flag for dynamic routing

* Update packages/next-server/lib/router/router.ts

Co-Authored-By: JJ Kasper <jj@jjsweb.site>

* remove example

* Add router tests

* Format code

* Sort routes

* Update to not use posix path methods
2019-05-27 11:20:33 -07:00

14 lines
232 B
JavaScript

import { useRouter } from 'next/router'
export default () => {
const router = useRouter()
const { post, id } = router.query
return (
<>
<p>
Blog post {post} comment {id || '(all)'}
</p>
</>
)
}