Get ID from a dynamic page
Unanswered
Yacare Caiman posted this in #help-forum
Yacare CaimanOP
Does anyone know how to get the ID of a dynamic page in Next.js when most of the code is running on the server? I've tried using useRouter but it doesn't seem to work in this context
12 Replies
@Yacare Caiman Does anyone know how to get the ID of a dynamic page in Next.js when most of the code is running on the server? I've tried using useRouter but it doesn't seem to work in this context
If you are inside your page.tsx or layout.tsx, you can directly get the dynamic part thought the params
Yacare CaimanOP
In a component i can’t get it?
You can get it by passing it as props down
@Yacare Caiman solved?
Yacare CaimanOP
Not yet
It is a personal project and I have too much time to make it
@Yacare Caiman Not yet
what information is missing to resolve your issue?
Yacare CaimanOP
At this time, nothing I don’t try yet I said, says before
@Yacare Caiman At this time, nothing I don’t try yet I said, says before
when will you try it?
@Yacare Caiman ?
Yacare CaimanOP
Idk
