rsnext/test/integration/dynamic-routing/pages/$post/index.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

7 lines
159 B
JavaScript

import { useRouter } from 'next/router'
export default () => {
const router = useRouter()
const { query } = router
return <p>This is {query.post}</p>
}