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

redirect issues

I have issues with redirect not working properly when called from a server actions , the account deletion work as intended but
redirect('/')
redirect('/')
doesn't seems to work it just finish the task and remain on the same page what am I missing am using app-router with drizzle-orm ```javascript "use server";...

Bundle type defs for a package in node_modules

I want to send type definitions for a package that is present in my node_modules folder to the frontend so that i can use it with monaco editor. The problem is how can i bundle all the types of the module into a single file. Sometimes a package has external type dependencies too, how can i handle that.

Self-hosting Next.js with graceful shutdown

Anyone self-hosting Next.js on places like Fly, Render, or Railway? Need guidance on how to handle rolling deploys: how do I gracefully shutdown my app? The default behavior with Next when receiving SIGINT or SIGTERM is to just quit the Next.js process with a 0 exit code. That’s nasty as it stops all work in requests that are in flight. ...

Efficient Handling of Dialogs in Next.js?

I'm building a platform with numerous dialogs for various tasks like viewing details and creating items. Currently, I'm using jotai to manage them programmatically. However, I also have 'global' modals accessed from different parts of the platform. To streamline this, I created a GlobalDialogProvider component where I import all dialogs. Yet, some involve data fetching and complexity, leading to significant big 'first Load JS' and 'First Load JS shared by all ' sizes. Any suggestions for optimiz...

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!

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...

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:...

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? ...

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

t3 starter app with nextauth auth.ts config problems

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

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?

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...

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

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!

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. ...

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....