Description
openapi-fetch version
0.13.4
Description
Hi there. I appreciate this lib very much, it has enabled me to bootstrap numerous APIs with ease and saved a lot of time.
Now I am trying to use it in a Next.js (v.14) project, but encountered a problem: promises, returned from the API client calls, can't be accepted as props to the underlying Client Components, triggering the following error: "Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported".
At the same time, Promises obtained from the equivalent fetch
calls go through successfully.
I'd like to know whether I've overlook something in the docs stating this limitation, or this may be fixed.
Reproduction
https://codesandbox.io/p/devbox/vy37yx (swap client call for fetch call in page.tsx
to remove the error)
Expected result
Promise from the lib is correctly passed down to the Client Component
Extra
- I’m willing to open a PR (see CONTRIBUTING.md)