Replies: 1 comment 5 replies
-
hi @ve1997.
You can use the
same. It would be good to generate a fetcher from the Hono client, so that typesafe can also be realized. |
Beta Was this translation helpful? Give feedback.
-
hi @ve1997.
You can use the
same. It would be good to generate a fetcher from the Hono client, so that typesafe can also be realized. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I want to replace Route Handlers in Next.js with Hono.
I've written some code, but I'm not sure if this is handling Hono properly.
I often see examples where multiple endpoints are defined for a single "route" within "api/[[. .route]]/route.ts", as in the example below.
I would like to write them as one file/one endpoint, etc. I would also like to know how to best export a single AppType in that case.
Finally, here is my current implementation
I'm also wondering if using useEffect to get the GET API in the Client Component is not optimal.
Would it be more appropriate to useSWR for GET requests similar to how useSWRMutation is used for POST requests?
If there is anything else I'm doing that is not optimal, please point it out.
This may be a rudimentary question, but thank you in advance. Thanks for reading.
Beta Was this translation helpful? Give feedback.
All reactions