Theo's Typesafe Cult

TTC

Theo's Typesafe Cult

Join the community to ask questions about Theo's Typesafe Cult and get answers from other members.

Join

how to remove all current data from planetscale main branch?

I made a breaking change and need to reset the main branch in order to deploy it, how to do it?

Modern Desktop App Framework

Hey guys, I haven't made a desktop app in a really long time, and I was curious what your guys opinions are. Is electron still good these days? Tauri looks interesting

shadcn/ui DropdownMenu component not working with Astro

I followed exactly the instructions from this page to use shadcn/ui with Astro, even using their template from scratch, when I add the Dropdown Menu component and use it (again, following exactly the example), I always get the following error: DropdownMenuTrigger must be used within DropdownMenu Any idea what could be wrong given the fact that I tried on a totally empty project following the instructions? It's useless for me to share you the code, it's exactly as the link above. 😅...

How to validate the media url returned from clients when using uploadthing?

Client uploads file(s), receives media url(s), sends them to the server , server stores them in database. But what if client submits invalid url(s) that don't correspond to the media files that were uploaded on the client? If the client hijacks the form submission process and provides a custom media url, how do we prevent that?...

Gatsby Could Shutdown, what are best alternative.

Hey everyone, as you probably know Gatsby Cloud is shutting down. At our company we have a couple of clients that have static websites that we host on Gatsby Cloud. We were looking into alternatives that would meet our feature criteria, which are branch preview builds, cms preview builds, different environments and possibly deploying to s3. The best solution so far would be vercel which supports Gatsby, but does not do great with cms preview builds which require a full rebuild and is not incremental. All the other features Vercel supports. The best alternative we found to deploying to s3 would be with GitHub Actions. We are also considering a rewrite to nextjs which would solve some of these issues which I have listed and some more that we have with Gatsby. Does anyone have any experience migrating off of Gatsby and Gatsby Cloud?...

trouble with Vercel deploy (no errors)

Summary Cant figure out why this is happening. The build is succeeding on local. then deployment doesnt work I dont see any errors....
No description

Bun window tsconfig

I have this error when using bun-types in the tsconfig.json as in https://bun.sh/docs/installation#typescript. This will fail bun run build. Anybody know why this is?

question about spread operator in react

Can someone explain why I need to use the spread (...) operator when giving each post to PostCard, but i can't use it when just console logging it?
Also, if PostCard only takes 1 argument: post, why can't i just pass the entire post to PostCard, why do i need to do ...post? thanks...
No description

paddle not working in next 13

Hello everyone, I'm trying to add paddle to my next 13 app project but I'm getting weird errors, soo I was wondering if maybe someone had similar issue soo i have my client code, vendor id is used here just as example...

Enum access question

If I have ```typescript export enum Options { 'bool' = 'Boolean',...

Clerk middleware public routes

I have an ecommerce website with the / route being public, and I'm fetching categories from a publicProcedure, but it doesn't work if I'm not logged with clerk....

Nextjs middleware being ignored

Hey, this is driving me crazy, using next, why I'm not being redirected to "/pending" by the middleware when pushed to "/dashboard" from a different (login) route using useRouter push login.tsx route ```tsx...

Error: Invariant: headers() expects to have requestAsyncStorage, none available.

Created a fresh create-t3-turbo and added my .env variables but getting the following error.
- error Error: Invariant: headers() expects to have requestAsyncStorage, none available. at Layout (./src/app/layout.tsx:43:79) at stringify (<anonymous>)...

T3 Tutorial - clerk errors out on a different machine?

Strange.. So, I followed Theo's t3 tutorial, everything worked fine last Friday. Today I cloned the repo on another machine, created the .env file with keys, run "npm i", run "npm run dev", and opening the localhost:3000, got these wo errors: :3000/:1 GET http://localhost:3000/ 401 (Unauthorized)...

Handling different platforms with git hooks?

I'm trying to set up something like commitizen with git hooks (either traditional or Husky) and running into issues getting a universal solution to work. Some of our developers use WSL and commit via command line. Others use powershell and commit via command line. On top of that some users use the VSCode git UI to handle commits. I can't seem to get things to play nice with all three. Anyone have experience with something like this? To me the easiest and maybe best solution is to get everyone unified on one method but it doesn't feel like that should be necessary....

Drizzle / PlanetScale Table Relations

Does anyone possibly have a link to a repo I can take a look at to see how relations are setup with Drizzle ORM and PlanetScale as the database?

How to handle FE requests > 1MB?

Hi all, I am sending some large polygons from my frontend for evaluation in the backend but when they get big I get the error message 413 "Body exceeded 1mb limit" I have read I should be adding the configuration:...
No description

shadcn/ui components are not rendering.

Hi, I've recently started testing T3 stack and I'm trying to implement some shadcn ui's however when I use the components the styles are not being applied even though when I inspect the element I can see it has all the tailwind css styles implied to the element. If you could see my screenshot for an example. I'm using the default button component and as you can see from the screenshot no style is applied even though its clearly there.
No description

How do i learn correctly?

I'm currently trying to learn react. I know building small projects is the best way to learn. But say i want to teach myself how to make a to-do app in react. Would it be smart to just google everything until im done? I have absolutely no idea where to start making a todo app. Any tips? Thanks!!

Template Suggestions

Are there any T3 apps that petty functional out of the box? I’m interested in building a quick admin console. I just need to get something up and running quickly