useRouter hook autoimport issue
Unanswered
rahulrbbisht posted this in #help-forum
![Avatar](https://cdn.discordapp.com/avatars/707806425748865155/b88fe81c13bce50730ec8eaf59a86ac6.webp?size=256)
rahulrbbishtOP
In Docs the use Router hook is imported from 'next/navigation' while when i am calling the useRouter hook directly in vs code as autoImport it is imported from 'next/router' so it is problem of vs code editor or there is issue in next js router itself
6 Replies
![Avatar](https://cdn.discordapp.com/avatars/694749037160824902/95960a6c36e52e168a16b7f6543b819f.webp?size=256)
Dayo
if you're using the app directory in Nextjs 13, it's
next/navigation
, but it's next/router
for the pages directory![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
in my case vscode suggests both next/router and next/navigation, next/router is the first suggestion and next/navigation is the second suggestion, and i just select the second one
this is neither a nextjs bug nor a vscode bug
you just have to select the right one
not a nextjs bug because the two hooks are working normally
not a vscode bug because it does suggest both