Skip to content

where should I put trpc.withTRPC in nextjs 13? #3185

Answered by KATT
dante01yoon asked this question in Q&A
Discussion options

You must be logged in to vote

tl;dr:

  • the @trpc/next-package is not Next 13-compliant
  • hence, the withTRPC is not relevant for Next 13
  • we don't have official support for RSC yet
  • use client components do work

Playground repo

Link: #3185
This is where we are doing experiments on tRPC + Next 13. It's not done, but you can use it as a reference if you wanna be on the bleeding edge of things.

Using tRPC with RSC is hairy right now and we haven't worked out exactly how the story looks like, even if we have it working with hydration and everything in that repo.

Setting up tRPC client (for use client) components:

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
8 replies
@oreillyross
Comment options

@harleyharl
Comment options

@markhughes
Comment options

@lewi6
Comment options

@pencilcheck
Comment options

Answer selected by dante01yoon
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet