Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
13 replies
McKamyk

Create T3, appDir, tRPC

So I'm wanting to start new pet project, this'll be the first time I'm using T3 with Tailwind, Next, and tRPC.

I want to use the new experimental appDir setting. When I create a repo with npm create t3-app@latest it defaults to the pages/ style. I added experimental: {appDir: true} to the next config, created a app/ directory, and copy pasted pages/index.tsx to app/page.tsx.

But I'm getting errors saying I'm importing a component that needs useState, which only works on Client Components.

Maybe one of these should be marked as a client entry with "use client":
  node_modules/@trpc/next/dist/index.mjs
  src/utils/api.ts
  src/app/page.tsx

Should I forego T3 and setup Next/Tailwind/Typescript/tRPC manually, or should I adapt T3 into using app/ properly?
Was this page helpful?