Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nextjs query parameter

import { useRouter } from 'next/router'

const Post = () => {
  const router = useRouter()
  const { pid } = router.query

  return <p>Post: {pid}</p>
}

export default Post
Source by nextjs.org #
 
PREVIOUS NEXT
Tagged: #nextjs #query #parameter
ADD COMMENT
Topic
Name
4+9 =