-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Your experience #1
Comments
Hello. I think this is good experiment but I'm not going to use this approach in future. I'm using tRPC not only for frontend-backend communication but also 'service' layer for fetching data in server functions like 'onGet', 'onPost'. And I feel service layer is more suited for Qwik architecture. Whole integration has some strengths but I think there are better patterns around 'actions/forms' that Qwik can offer. I feel that to get most of Qwik architecture we need to reduce code that runs on init (tRPC needs setup) and be aware of client code and data that is sent to client. I saw discussions on Qwik discord that they want to add remix/solid-start like forms in future. I really like those patterns and I hope they go this way. I prefer building apps this way. I'm out of loop right now so I don't know exactly what's the current status. I did few tests and my favorite approach is currently:
Big strength of tRPC is great integration with client caching solution like tanstack-query. Without such caching layer I don't feel there is much difference between using tRPC and using actions/forms. I would recommend to use tRPC in Qwik project if you value back-end features - how it can help structure code, possibility of adding custom middleware, reusable primitives and type-safety. It's not super hard to build similar things by following trpc mindset without installing trpc itself. This whole thing reminds me of discussions about using tRPC in Remix. Builtin Remix features are covering most of strengths of tRPC. Maybe you can find some discussions and better explanations by searching for Remix/tRPC threads. |
@wmalarski How is your experience up until this point with building an application with QWIK + TRPC?
The text was updated successfully, but these errors were encountered: