Using Dynamic Routes with Vercel Functions?
Seems like there should be a way to do this...
For the route
/api/events/init/[key]
I have this code:
This results in the error:
Seems like there should be a way to use dynamic routes in Vercel Functions, right?
What am I doing wrong?4 Replies
you can only use useParams on client side
to get the param on the api, use accept a second param on get
Thank you for that. Even now having learned this, it seems like the Vercel docs are unclear about this (or maybe plain wrong). It looks like they're saying that 2nd
context
parameter is not supported in Next.js:Functions API Reference
Learn about available APIs when working with Vercel Functions.