CraftzCode
Prefetching with tRPC: Using hono.js/Express adapter and Next.js
If I use
Hono.js
or Express
as the adapter for tRPC
and my frontend is Next.js
, will I be able to utilize the prefetch
features referenced in Set up with React Server Components1 replies
What is the best approach when using monorepo with tTPC
What is the best approach when configuring tRPC inside of monorepo? I would like it to be used in Next.js, I create an
internal library
for tRPC
example packages/api
so I can call it anywhere in monorepo, now I would like to know where exactly is the best place for the client.tsx
and for the tRPC caller for Server Components
which is the server.tsx
can I place it also inside of the internal library of tRPC or I will place it inside of Next.js which is on apps/web
.1 replies
Integrating hono.js with tRPC in Next.js: Routing and Context Considerations
I want to combine Hono.js with tRPC. I followed the guide on the 3rd party middleware made by hono for a tRPC server, and now I have set up the hono tRPC server 3rd party middleware similar to the code below:
Now, where should I place this code in Next.js? Should it go in
app/api/[[...route]]/route.ts
or in app/api/trpc/[trpc]/route.ts
?
Also, what is the best approach regarding context—should I use the tRPC context or the Hono.js context?21 replies