router.query is undefined
Answered
Asian swamp eel posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Asian swamp eelOP
Feel like getting dementia but router.query suddenly is undefined.
both renders return undefined and my IDE "intellij" suddenly also doesnt like it anymore.
using pages dir, latest next version and using the hook on the index page as I did on multiple other projects aswell.
What did I miss / what dont I see xd
both renders return undefined and my IDE "intellij" suddenly also doesnt like it anymore.
using pages dir, latest next version and using the hook on the index page as I did on multiple other projects aswell.
What did I miss / what dont I see xd
![Image](https://cdn.discordapp.com/attachments/1130524031288885378/1130524031469236295/image.png)
2 Replies
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/f386ac21405ce3442e0f3598223e1cb3.webp?size=256)
joulev
Import useRouter from next/router not next/navigation
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Asian swamp eelOP
ah hell, thanks a lot