skip to Main Content

Javascript – params is undefined in Nextjs?

I have the below function in app/api/hello/[slug]/route.ts when I console log I get undefined . why ??? app/api/hello/[slug]/route.ts export async function GET({ params }: any) { console.log(params); } log - wait compiling /api/hello/[slug]/route (client and server)... - event compiled successfully…

VIEW QUESTION
Back To Top
Search