Dynamic routes in nextjs got null #6582
devmnj
announced in
Event Q&A Q3 2021
Replies: 1 comment
|
Hey @ManojAP, Thanks for your question! It looks like you're stuck making progress with your project. To get the most out of the live event, we're keeping this Community Q&A category focused on questions that are relevant to the community as a whole. Seeing as this question is specific to your project, would you mind posting it to our community Slack in the #keystone-5 channel? That's the best place to get focused support on blocks you encounter with Keystone - https://community.keystonejs.com |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am trying to get dynamic route in nextjs-keystone5 app. And got
TypeError: Cannot read property 'query' of null
import { useRouter } from 'next/router'
const Post = () => {
const router = useRouter()
const { pid } = router.query
return
Post: {pid}
}
export default Post
All reactions