benjaminreid
benjaminreid
TtRPC
Created by benjaminreid on 11/1/2023 in #❓-help
Would you recommend tRPC’s usage in this case?
So we have two applications, one existing, one about to be started. These two applications will talk to an external API in the exact same way. The current application uses React Query to do so. I’m thinking about creating some shared library/SDK/service (whatever you want to call it) so these two applications can consume the API in the same way. I guess tRPC solves this quite well in some respects, have the tRPC client be it’s own package, have the two applications consume it. The procedures in the tRPC client are going to to be making fecth requests to this external API though, maybe transforming the data so it’s more suitable/consistent for the consumer applications. Anyone done anything like this? Or does anyone see this as being a good or really terrible idea?
7 replies