Best way to get search params in an API route?
Since useSearchParams() doesn't work in API routes, I'm wondering if there's an easier way to get them than what I came up with:
which seems a bit cumbersome. I'm passing the params to zod so I'll need them in plain object format.
1 Reply
I'm afraid this is the way, at least right now.
The API routes engine is not yet wrapped with deeper and more thoughtful helpers as you'd expect in api- specific tools like Hono