Shaddix / react-query-swagger

Generates react-query hooks based on Swagger API definitions
MIT License
122 stars 4 forks source link

RSC Compatible? #46

Open swag-overflow opened 3 months ago

swag-overflow commented 3 months ago

Hey,

is the output of this Library ready to use in a Next.js 14 setup. I had issues to use the generated Request in Server components. The BaseUrl and fetch function override that I've added doesn't seem to work on a Server component.

Also there seems to be no Support for SuspenseQueries and prefetching?

Shaddix commented 3 months ago

Personally I haven't tested it with RSC, but since this is just a code generator for Tanstack Query you'd better check if TanstackQuery itself has the RSC support.

Regarding the Suspense and prefetching - it's not available currently, but planned to be added very soon (it's being tested now)