Compatibility with Next.js 13 Route Handlers #424
Unanswered
sarimabbas
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Unfortunately, route handlers would not allow zodios to infer the route, because ts don't have access to file named information. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can still implement your server with next route handlers and use zodios for client side only (or call external api on server side) . Just that you'll not get server side type safety |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I hope you are well. Thanks so much for your work on this library.
It seems like Next.js Route Handlers run in both Node.js and Edge runtimes, with isomorphic Request and Response objects. Is it possible to set up the server component of Zodios with a Next.js route handler instead of a Next.js API route? It seems like a Fetch-based client implementation is landing in v11. Will something like that follow on the server? Perhaps it is too difficult if the Zodios app uses Express under the hood. Would love to hear your thoughts, thank you!
Beta Was this translation helpful? Give feedback.
All reactions