Next.js Discord
Discord Forum
What is the alternative for useRouter() for server components
Answered
Rule
posted this in
#help-forum
Open in Discord
Rule
OP
2023-09-07T09:08:57.000Z
I want to get the current path with the server components. How should I do that?
Answered by
joulev
https://nextjs-discord-common-questions.joulev.dev/get-pathname-in-server-components
View full answer
3 Replies
@Rule
I want to get the current path with the server components. How should I do that?
@ts-ignore
2023-09-07T09:09:14.000Z
you can't
@Rule
I want to get the current path with the server components. How should I do that?
joulev
2023-09-07T09:09:20.000Z
https://nextjs-discord-common-questions.joulev.dev/get-pathname-in-server-components
Answer
Rule
OP
2023-09-07T09:10:29.000Z
Thank you <3!