tatethurston / TwirpScript

A protobuf RPC framework for JavaScript and TypeScript
MIT License
141 stars 14 forks source link

Is there react query integration? #227

Open talksik opened 3 months ago

talksik commented 3 months ago

Does anyone have an example of integrating a twirpscript client with react query to be type safe like trpc does?

tatethurston commented 3 months ago

There isn’t a react query integration I’m aware of, but you could share your example here if you do one. The generated twirpscript client is already type safe.

talksik commented 3 months ago

Gotcha @tatethurston

I will let you know if I can get my typescript skills back to do something like trpc did.

I am sure someone can chime in here as this post gets more views.

tatethurston commented 3 months ago

What's the developer experience you're looking for?

talksik commented 3 months ago

Here is a good example: TRPC + React query integration

This would mean we don't have to specify the queryKey and queryFn for everything in addition to a lot of other niceties of being type safe such as doing type safe react query refreshes.