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

clerk design

can I design my own clerk signup/sign in page? or We can only use clerk template ?

create-t3-app | /app directory

Hello, I was wondering if I can create a t3 project with the new folder structure of next js or if there are any plans of updating it to the new folder structure

Forward Ref with SVG

```tsx const ComponentToRender = dynamic(() => import('./../lib/assets/svg/1.svg'), { loading: () => <p>Loading...</p>, }) // eslint-disable-next-line react/display-name...

WYSIWYG editors for ts

any recoms for WYSIWYG editors which work well with ts like quill and draftjs

How to setup a T3 app for a PWA?

I am making a web app and I want it to be a PWA. I have installed the next-pwa library, added the manifest json but I am confused about how to set up its config file. It's giving error during build time.

how to seperate dev vs prod db

Hi everyone I have a local dev db and a production db on railway however when ever I use my local dev db I need switch the env variable in my prisma schema to dev instead of prod. How do I have the prod version but continue to work with dev on my local machine

Where to find implementation of bodyParser middleware for next js api route

Hi trying to manually import the next js bodyParser middleware but cant find it's implementation in the next github repo, anybody know where I can find it ty : D (Doing it to create a middleware for a trpc openapi router so can have the raw body for some endpoints and the parsed body for others)...

Watchpack error: EACCES: Permission denied

using watch mode of next 13 is constantly throwing this error on my project console, i assume this is the reason my watch mode is taking forever to load the new code that i often need to reload the page i'm very noob to WSL and linux stuff, how can i solve this error? ```json...

make geocoding request serverside or clientside?

So my user will enter an address and I want to convert that address to latitude and longitude numbers using a geocoding api to store in my db. However, do I make that request on client side and pass it into the mutation procedure as its own input, or should I do it serverside within the procedure itself? What are the pros and cons?

SSGHelper & GetStaticProps - Not loading data server side?

I'll preface this by saying I've never used SSGHelper nor GetStaticProps before, I'm definitely a noob at this. I've followed the docs here: https://trpc.io/docs/nextjs/ssg-helpers ...

Theo's video about database performance

After watching the video and reading few comments Just wanted to ask Example as for me i host my t3 stack app on my digitalocean vps And use mysql database locally installed ...

SPA or MPA for react native dev

Hi all, I am fairly new to React Native mobile development, and have cloned the turbo and clerk template. I was looking into using different screens or how to implement them, and I was wondering if I should be treating my app as Single Page App or Multi Page App? I’ve looked into the docs of React Navigation/native and it seems confusing if I need to pass the navigate property to every screen/component that needs to reroute the app and seems very weird not correct. Is there another library I could use or should I be treating it as a SPA and just change what is rendered based off the users selection?...

get variant list from CVA definition

Hey all I'm using class-variance-authority to define component styles. Wondering if there's a way to reuse the defined variant keys. E.g. ```tsx import * as React from "react" import { VariantProps, cva } from "class-variance-authority" ...

Issue with Next-Auth DefaultSession module augmentation

Hi there, barely made a new t3 project. I am getting an error probably related to the module augmentation for users id. Here is the error....

Client variables not typesafed

Hello, it seems I did everything right from the docs, but I still have client variables not typesafed. see example in .tsx file...

insert query in kysely, typerror

Hi, I try to migrate from prisma to kysely, only use Prisma for generating the types. Currently I have a insert into db like this with prisma api ```ts await ctx.prisma.voteAnime.create({ data: { votedAgainstId: input.votedAgainst, votedForId: input.votedFor,...

clerk cant check passwordless

so did clerks dashboard get a new update to the ui? bc in the tutorial theo could easily check passwordless but here it isnt an option

prefetchInfinite on getServerSideProps using SSG helpers

I'm trying to implement pagination using infiniteQuery and SSR with trpc: - ``` export const getServerSideProps = async () => { const ssg = generateSSGHelper();...

Typing Prisma Wrapper Function

```ts public async getUser( { provider, accountId }: Partial<{ provider: string; accountId: string }>, include?: Prisma.UserInclude ) {...

tRPC prefetching URL slower? - What am I doing wrong here.

I've been toying with ISR attempts, failing, so moved back and am going step by step. During testing, I tried (and by the loading page details of the JSON) succeeded! The pre-fetched data is there! However, the page is 30% slower in lighthouse! Am I doing this wrong? The goal is to eventually have it cached for SEO purposes, so pre-fetch of just the query isn't quiet there yet....