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

Is there any reason to use start a docker container without using compose?

I have always run docker containers using docker-compose, even if it's just a single container. But every guide I see for dockerizing things includes instructions for how to build and run the container without compose, something like
docker build -t ct3a-docker --build-arg NEXT_PUBLIC_CLIENTVAR=clientvar .
docker run -p 3000:3000 -e DATABASE_URL="database_url_goes_here" ct3a-docker
docker build -t ct3a-docker --build-arg NEXT_PUBLIC_CLIENTVAR=clientvar .
docker run -p 3000:3000 -e DATABASE_URL="database_url_goes_here" ct3a-docker
...

Whats the correct way to wait for `trpc.useQuery` to finish and then update state?

Like the title said, I have a case where I need to press a button 2x to update my state. That happens because useEffect does not wait for useQuery to be finished. Is there a way to sync those two ?...

Kind of stupid question

But I've recently discovered T3 stack. What are some interesting project ideas to build with it?

Is there a guide or best practices about hosting a web app build with T3?

Really curios about how you guys go about this. You host database + backend + frontend in the same place? Or do you like to split things.

why don't we have a compiled version of css and html?

The development speed wouldn't be any better. it might take a bit longer to setup, but the result is gonna be really good. - less memory needed. - no parsing which means faster runtime. and if it's well optimized for the size it's gonna be even better. because of the lower latency....

Documentation section inside an already made React app ?

Just looking to create an accesible documentation section without the need of creating a different app for that purpose, not really limited to, but wondering if I could run some sort of Docosaurus inside or if anyone know any other alternative.

medium, hashnode alternatives?

are there any alternatives to medium and hashnode? i was thinking of building something like it where you can host the blogging platform on a custom domain and was curious if there any other platforms that let you do this. i know i can build a better platform that medium/hashnode but i'd also like to see the alternatives and if they are better or worse.

Odd Tailwind behaviour, unable to apply certain rules

I am doing ordinary flexbox stuff using tailwind. I wanted to apply justify-around to a div, but it doesn't apply. I open devtools, see that the classname is correct. I check the styles tab in the devtools, the property has not been applied, eg. no mention of justify-content: space-around ...

Where to start on mobile dev?

I wanted to start learning mobile dev, (i have some experience with flutter but not good enough to build a full app). I've been thinking about going to native(not react native) route (mostly ios). So, any advice to get started? i search yt a few times and most of it are all swift and firebase. is this the right choice? idk help me xD...

Sub Domain - Creating it Programmatically (GoDaddy, Azure,AWS) - NodeJS

Can someone guide me on can I create Sub Domain without having to go through the DNS/Server configuration manually. I'm planning to create an admin panel where I can setup the sub domain for example: career.mydomain.com And it configure everything in the background rather manually going and doing it....

What is the way to solve google not giving me my avatar half the time?

When a user logs in with google, frequently enough the avatar doesn't resolve because google rate limits. I'm not entirely sure why, but I really don't want to get images and put them on a bucket somewhere, so is there any decent way to tackle this?

Accessing req & res in Trpc + Next.js

Total beginner question. Would love to move my next.js project over to trpc, but am having problems getting started. How would I access req & res objects in NextJS with trpc? My current code / function starts like this:...

Creating CLI for interacting with prisma database

Hi! I'm looking to write a little script in my create-t3-app which would allow me to easily add an entry to the database. I don't want this exposed in the web app, and I think it's inconvenient to just add a function call which runs once that I then, later delete. Is there any way for me to just create a .ts file which I can run in isolation in the project? Maybe parse some command line arguments and such?...

React Icon situation

Random Question; what icon cdn/library/etc. do you guys use?

Typescript import best practices?

Is there a difference in the compiled package between import { useEffect } from "react" vs
import * from "react"
React.useEffect(() =>{})
import * from "react"
React.useEffect(() =>{})
?...

Trouble with NEXTAUTH_URL

I've been getting the missing next auth url error in my console, even though my NEXTAUTH_URL is defined in my .env: ``` dev: [next-auth][warn][NEXTAUTH_URL] dev: https://next-auth.js.org/warnings#nextauth_url...

[TypeScript] How would you go about creating an Array that can have different types of objects?

Firstly sorry if this isn't the right place to ask TS question, but I didn't know where else to ask 😢 I have a dilemma in a project I am working on. The example I will give is not how we do it, but you should get the idea... The project is about task solving and because of some cases we have decided to have a type like so: ```...

framer-motion does not work well inside a portal

anyone with framer-motion experience? having issues when rendering inside a popover when items are returning to the list, they are coming from seems like (0,0) of the screen also, AnimatePresence doesn't seem to work at all...

learn react and get comfy with thinking in react

Hey guys what's cool way about learning React (Making projects and searching for help in beta docs when stuck?) I did some react course and have basics but I don't feel like it clicked with me enough to build stuff on my own (react way of thinking especially)