Next.js Discord

Discord Forum

dynamic routes in nextjs v14 js version (not typescript)

Unanswered
Raspberry Horntail posted this in #help-forum
Open in Discord
Raspberry HorntailOP
i'm having an issue in getting the params like [userId] in next js javascript version i tried to do in the same way as typescipt but it keeps returning undefined and there is no key for it in the nextUrl object or something can anyone help please ?
yea BTW this problem is only in the api routes

1 Reply

Black-throated Blue Warbler
Can you post some of your code for the api route?