useRouter()
Unanswered
California Towhee posted this in #help-forum
California TowheeOP
How do i get the properties like aspath, isReady etc that router provides when importing from "next/router"
but now i am importing router from "next/navigation"
but now i am importing router from "next/navigation"
4 Replies
@California Towhee How do i get the properties like aspath, isReady etc that router provides when importing from "next/router"
but now i am importing router from "next/navigation"
you have
usePathname, useSearchParams etc; asPath can be constructed from these hooksCalifornia TowheeOP
and other properties like isReady, events how can i get those properties ?
@California Towhee and other properties like isReady, events how can i get those properties ?
You don’t have isReady anymore, using useSearchParams + Suspense is enough
For router events see https://nextjs-forum.com/post/1122096053466968074
For router events see https://nextjs-forum.com/post/1122096053466968074
California TowheeOP
got it thank you😀