mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
16 lines
282 B
JavaScript
16 lines
282 B
JavaScript
import { useRouter } from 'next/router'
|
|
|
|
const Page = () => {
|
|
const { query } = useRouter()
|
|
return (
|
|
<>
|
|
<p>post: {query.post}</p>
|
|
<div id="query">{JSON.stringify(query)}</div>
|
|
</>
|
|
)
|
|
}
|
|
|
|
Page.getInitialProps = () => ({ hello: 'world' })
|
|
|
|
export default Page
|