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
Tterlan88924/28/2024

how to import server action function to client component from file that has "server-only" package?

So I have the following client component which calls a server functions. but inside of actions file, when i import "server-only" package, it doesn't work anymore. How can I fix this? Thanks
No description
Rraphico4/28/2024

Deploying a dockerized next.js app

Hey everyone! Has anyone deployed a Dockerized Next.js application to production before? I’m looking for some guidance on how to do the same with my application. Any tips or advice would be greatly appreciated!
HHarris4/28/2024

Has anyone used JSON Patch with an authoritative server state?

Has anyone implemented JSON Patch over WebSocket? It seems like it is just what I need, but there's a twist: - I need the server to be authoritative...
Ttomharto4/28/2024

How would you structure the backend for an application like this?

I have a simple app I want to rebuild in T3, and curious what approach would work well, I haven't used React/TRPC so don't want to work again the tools. It's a simple reading list, books grouped by month, and within each month ordered by the date the book is marked as read. I have a few ideas:...
Ssparksupwardsfly4/28/2024

Please help me save our internal app from cookies set at subdomains in our company!

Our Nodejs Express application is seeing 400 bad request responses and 413 request header too large because of cookies that it does not create. These errors can create really unexpected app behavior for users. These cookies were created by other applications i.e. otherapp.mycompany.com sometimes that have domains .company.com but sometimes have domains like otherapp.mycompany.com. These cookies are tagging along in my applications header and wreaking havoc. What is the best practice here? ...
IRIbnu Rasikh4/27/2024

Fail to try beta version of Typescript because @t3-oss requirement

hello guys, noob question, how to bypass peer dependencies requirement? i want to use typescript 5.5.0-beta, but failed because @t3-oss have requirement of ">=5.0.0", so i try to change it to ">=5.0.0-beta" temporary, and failed again. is there any better solution to pass the requirement? or should i downgrade typescript version to the latest stable version? thanks!
No description
NnyanSpruk4/27/2024

t3 starter app with nextauth auth.ts config problems

```tsx const config = { providers: [GoogleProvider, FacebookProvider], adapter: DrizzleAdapter(db, createTable) as Adapter, callbacks: {...
Ccucaracha4/27/2024

whats the proper way to disable auto zoom focus on inputs and textareas on mobile?

whats the proper way to disable auto zoom focus on inputs and textareas on mobile? i know you can set max scale but ive heard thats bad practice. is there any other way to do this thats not considered "bad practice". i dont want to increase my font size too 16px +. anyone know how to hack this?
DDor4/27/2024

internal server error when deploying to DigitalOcean

When entering some specific pages in my site, the server gets an error and shuts down. Why is this happening? I run it locally - everything works I run it on vercel - everything works...
XXavierBread4/27/2024

error: NEXT_REDIRECT

I'm doing a server call in RSC, but it crash the app and show this kind of error and It shows in the pic. So, how to make a redirect when user validation failed in a trpc middleware? https://github.com/Dieber/t3-test-redirect...
No description
SHSSabbir Hossain Shuvo4/27/2024

Nodejs take less time instead Bun

Why they close this issue?? https://github.com/oven-sh/bun/issues/10519...
Rraphico4/27/2024

Testing in react

Hey everyone, I’ve been pondering whether diving into learning how to test React code is worth it. Does anyone here test their React code, and if so, how crucial do you find it? Appreciate any insights or experiences you can share!
NnyanSpruk4/27/2024

Create t3 app with nextauth and new router problems

I have a question regarding the t3-createapp with nextauth. In what file do I put my <SessionProvider> ? I would've assumed that the t3 app generator would handle that for me, but it didn't, and im not sure where to put it. I am trying to do it in the app/layout.tsx like i did with my normal next project that im using for reference, but its not working. ...
Mmchisolm04/27/2024

Modals failing from tutorial

https://github.com/mchisolm0/gallery/pull/2 I am having trouble getting the modals/app router working how I expect. When I click on pictures sometimes it loads, sometimes it gives "Unauthorized" errors, and sometimes it complains getImages(idAsNumber) is not a function. I have created a pull request on my repo in case that is helpful for context. I am getting off of hear to get some rest and hoping fresh eyes tomorrow may help me solve it. Thank you in advance if anyone has suggestions or wisdom....
GGetPsyched4/26/2024

Benefits of using auto incrementing primary keys?

Is there any benefit of using auto incrementing columns as primary keys in postgres when I have another column that is unique and can be used as a primary key?
Bbythewayitsjosh4/26/2024

Is Tanstack Query needed when using Next Route Handlers?

Basically what it says. To my understanding a Route Handler is basically a custom built endpoint that receives a Request and returns a Response. Standard REST-ful stuff really. With that in mind, if I'm fetching data on the client, would something like Tanstack Query still be relevant / provided any significant value? I know the Route Handlers already include caching and revalidation, as does TQ, but I'm not sure if TQ provides anything further that makes it worth including. Given the versatile nature of TQ and the sheer number of features, I imagine so, but wanted to check they weren't already covered by Next....
JJustinR4/26/2024

t3 env doesn't seem to work with docker compose build

I'm working to validate my application before pushing it to my CI/CD pipeline. I keep getting failed docker builds because it can't find my environment variables, I'm using the recommended dockerfile in the t3 documentation to build the container ```yaml app: build:...
BBigLung4/26/2024

NextAuth - Email Provider Breaking Google Provider!

Howdy, Some users of my app (app.getriver.io) started reporting not being able to log in to our app. We tested and figured out that some people who originally signed up with email + magic link are then trying to sign in with google (but connected to the same email they originally authenticated with) Is it possible to intercept login attempts like this so that you can interchangably login with email or google for the same email?...
CCircus4/26/2024

VSCode Import Autocomplete Purgatory (Relative, absolute, and barrel paths)

I hope I'm missing some easy setting, otherwise this UI seems pretty terrible. Why does the autocomplete path for barrel imports not show up on autocomplete? Manually typing out import {Avatar} from '@components works and does not cause issues in the code, so this is certainly a VSCode setting of some sort ``` // src/app/_components/index.tsx import Avatar from "./Avatar";...
No description
Next