trpc-remix icon indicating copy to clipboard operation
trpc-remix copied to clipboard

An example project is needed

Open unbiased-dev opened this issue 3 years ago • 3 comments
trafficstars

Hi, I was looking into trpc and saw that you have a remix-adapter.

The readme minimal setup is very confusing for me.

Would you be able to create an example project?

Thanks in advance

unbiased-dev avatar Aug 16 '22 15:08 unbiased-dev

+1 for an example.

I am a huge Remix fan but something I've been interested in is exposing a tRPC endpoint for my react-native mobile app to consume.

Wondering if this is a path I could take towards that?

Ideally - id have a monorepo with remix + RN and a domain/service layer with Prisma that could be shared.

I could see Remix calling the domain layer directly or via tRPC

Lastly, curious about the viability of deploying something like that on vercel serverless.

stephen776 avatar Dec 03 '22 02:12 stephen776

I am also looking for some better examples of integrating tRPC with Remix. I have a few pages in Remix that have a lot of small mutations (e.g. add, edit, delete, like, etc.) I currently am using individual resource routes for each of these actions. But it feels "strange". I also experimented with having all the mutations post back to the page route and using hidden form values to determine what "action" to carry out. All of these approaches seem off to me.

I love Remix for the simplicity of data loading on the server and posting back to the same route for an action, but when you start to get a lot of interactivity on a single page, then the backend code starts to get a little messy (e.g. separate resource routes or switch statements in a single action handler).

My thought was to reach for tRPC and have a single tRPC api route and then define my procedures accordingly. But, this site is the ONLY place I have seen any kind of thought about using these together. But, the example is not quite clear to me. If anyone has any other resources, I would love to know about them. Thanks!

kevinswarner avatar Dec 21 '22 23:12 kevinswarner

Hello, have you guys figured out how to use the basic example? Is this package maintained @ggrandi?

absamo avatar May 14 '23 19:05 absamo