LunaCrafts
Using tRPC (createCallerFactory) with react-query.
Hey @infodusha!
I initialize tRPC 'server-side' code on browser-side, and to be fair I do it quiet often. As you can see, I initialized tRPC with two flags (isServer set to false, and allowOutsideOfServer set as true).
It's very useful approach and totally makes sense in some cases but I can agree It's not very common use-case. It works very well, and you can initialize 'server-side' code in a browser this way.
However, I'm not able to use any third-party packages this way, because they require "trpc client", not caller. I would like to make that happen, because otherwise I need to repeat myself and write all of the hooks manually
8 replies