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

Next 13 - App Directory feature and tRPC

Is there any pre-release version of create-t3-app which has been updated to App Directory feature and also updated tRPC accordingly?

Why does tailwind have so few default options for min-width?

I'm getting into using tailwind and so far I've found it far easier to work with than css-in-js or other solutions I've tried in the past. However, I'm wondering why there are so few default options for min-w-*. It kinda makes me think I'm doing something wrong. For example, I have a page with some user generated rich text. I want this to have a max-w-prose so that the lines are always readable. However, on larger screens when the user hasn't entered much text, the rich text area is extremely narrow....

Typescript React Component Props Error

Hi, I'm trying to implemented an AuthenticatedRoute component. I'm wrapping the Route component from react-router-dom. Getting a frustrating TS error. I just don't understand how to fix it, can anyone help?

Turborepo + Prisma + TRPC

quick sanity check before I drop the idea of letting turborepo cache prisma has anyone run into this error when using prisma + a custom generated output with next-auth or trpc? https://github.com/prisma/prisma/issues/13233...

React + Typescript...Its return type 'Element | undefined' is not a valid JSX element.

React + Typescript...Its return type 'Element | undefined' is not a valid JSX element. I have a component where I did consume from an API that returns an array of objects but the parent component is giving me some error that says `'UsersTable' cannot be used as a JSX component. Its return type 'Element | undefined' is not a valid JSX element....

Ok, so what am I missing

I get a
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. when the changeFeildValue handler is fired.
import React from "react";...

Spotify API 504 Gateway timeout

When I increase the limit of my spotify API search call it works fine on local host but I get an Edge Status: 504 in vercel. Any idea why this might be happening or how I should work around it?

Learning a new keyboard layout

Qwerty sucks. Even more does Qwertz (yes, I'm German). Learning an alternative keyboard layout sounds like a great idea to me, already knowing I will regret that of course poohheh I read about "programmer dvorak" which seems to be the general #1 choice for general programming. Still you guys might have own experiences, and maybe know about a more fitting one specifically for JS or even React....

ping.gg logo

Hi guys, is there anywhere available ping logo as svg? My girlfriend is working on logo animation for a university project and i thought it might be cool to do ping logo. Theo? Are you cool with that?

window is not defined inside Suspense boundary.

I am loading a component with React.lazy() that uses window.location.origin inside <Suspense> boundary like this. const LinkCreateForm = React.lazy(() => import("../components/LinkCreateForm")); <React.Suspense fallback={<div>loading...</div>}><LinkCreateForm /></React.Suspense>...

Serializing date with superjson

Think I'm going wrong somewhere implementing a server side request for the user and serlializing the data with superjson. Any ideas? `export const getServerSideProps = async ({ req, res }: GetServerSidePropsContext) => { const session = await getServerSession(req, res, authOptions) ...

How do I access onSuccess with TRPC client side?

We can do it with react query quite simply, but i don't see a documentation on it with trpc. if the request is succesful i want to save the data to global state via zustand. I need the onSuccess to do it i believe. ```js...

Postgres get number of rows from query

Hi guys, I am this query ```ts WITH city_title AS ( SELECT "geo"."city",...

Stripe - Payment Intent

Hello, I am trying to use payment intent which return a client secret. How can I get the checkout URL. When I went through their process they are suggesting to get like stripe elements to create form on front end and stuff. but is there a way if I could just return the checkout url form the backend?...

Learning a functional lang

Has anyone got recommendations on a functional programming lang to learn? Kinda wanna get into it lmao

Type that omits all inherited properties?

Say we have ```ts class Person { age: number } class Child extends Person {...

Loading UI not interactive

Hey, I played around a bit with loading ui's in next 13 and for some reason links, buttons, etc. can't be clicked during loading. I wondered if that is correct or if im just stupid Thanks...

Question about Prisma Data Proxy on Vercel

So I just setup Prisma Data Proxy with my Next project deployed in Vercel, but I noticed something weird is happening with the schema it seems like its not being updated in production even tho its updated in my main branch in Planetscale.. Is the migration setup required to deploy on vercel using data proxy? I think thats what im missing but not sure...