useRouter was not mounted
Answered
Standard Chinchilla posted this in #help-forum
Standard ChinchillaOP
I have mounted useRouter
Import { useRouter } from 'next/router' ;
But I get a runtime error :
useRouter was not mounted
Import { useRouter } from 'next/router' ;
But I get a runtime error :
useRouter was not mounted
3 Replies
@Standard Chinchilla I have mounted useRouter
Import { useRouter } from 'next/router' ;
But I get a runtime error :
useRouter was not mounted
import { useRouter } from "next/navigation"
Answer
Standard ChinchillaOP
But it says next/router in the documentation
@Standard Chinchilla But it says next/router in the documentation
if you're using app route it should be from
navigation else router