79239576

Date: 2024-11-30 12:56:56
Score: 0.5
Natty:
Report link

Below code might help the people who started learning nextjs api calls. to get dynamic routing id.

app/api/events/[event]/route.js
export async function GET(request, { params }) {
  const slug = (await params).event //event id
}

this slug will return to get [event] value

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ponsakthi Anand