dynamic url
Answered
Indian oil sardine posted this in #help-forum
Indian oil sardineOP
I want to retrieve user details based on a username provided in the URL, for example, /user/[username]. I intend to display this user's information publicly. Can this be achieved using a server-side component exclusively?
9 Replies
Indian oil sardineOP
hey @joulev , thank you for answering ,
I'm new to next so how should I get the path in server side and render the detail;
the documents I referred asked me to use useRouter get the user slug and get data using fetch API , but useRouter works in client side
Is there any other way ..
I'm new to next so how should I get the path in server side and render the detail;
the documents I referred asked me to use useRouter get the user slug and get data using fetch API , but useRouter works in client side
Is there any other way ..
@Indian oil sardine hey <@484037068239142956> , thank you for answering ,
I'm new to next so how should I get the path in server side and render the detail;
the documents I referred asked me to use useRouter get the user slug and get data using fetch API , but useRouter works in client side <:blob_thonkang:753870952709750834>
Is there any other way ..
yes, check the link above.
useRouter() is the way to do it in the pages router, but in the app router we don't do it that way
useRouter() is the way to do it in the pages router, but in the app router we don't do it that way
Indian oil sardineOP
Thank you @joulev !!
if you dont mine can you also help with this
https://nextjs-forum.com/post/1154348311466221568
https://nextjs-forum.com/post/1154348311466221568Could you please recommend any GitHub repositories or YouTube channels that can help me dive into Next.js? Thanks in advance 

@Indian oil sardine if you dont mine can you also help with this <:blob_aww:770008738147991562> https://discord.com/channels/752553802359505017/1154348311466221568
i haven't used next-auth for a long time so can't help, sorry
@Indian oil sardine Could you please recommend any GitHub repositories or YouTube channels that can help me dive into Next.js? Thanks in advance <:meow_meow:763826941358374963>
same for this, i learn nextjs from the documentation and cannot give you other sources