router.query is undefined
Answered
Asian swamp eel posted this in #help-forum
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
2 Replies
joulev
Import useRouter from next/router not next/navigation
Answer
Asian swamp eelOP
ah hell, thanks a lot