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 Image Behavior

Hi, I am just curious if this looks like normal nextjs image behavior (the popping in of the images)? https://rust-meta.vercel.app/raiding/calculator Thanks!!...

resources suggests

Am looking to trigger events, read and write to database etc all from task and queues I have zero knowledge on this looking to do a few things with it like payments processing and image optimization Suggestions that works best with express js ...

Using outer and inner context together [trpc]

Hi guys, I am experiencing troubles during implementing both - inner and outer context in one appRouter. Let me show you an example below: I want to use two contexts alternately, when I'm calling some stuff on client-side I want to use outer context, but I also want to use getServerSideProps to send some other queries, that are context unrelated - here I want to use inner context. Is there a way to combine both contexts on createNextApiHandler (appRouter), or I need to create two 'apis' - one for inner context and the other one for outer context?...

Next Build Stops After Type Validations

I have a dokku deployment set up which when running, no longer successfully builds my app. The logs outputted are the following: ``` -----> Build Running build (yarn) yarn run v1.22.19...

Image upload for MongoDB?

Hey all, I currently have a MongoDB which I store recipes, users and user sessions, I am implementing a recipe image that the user can upload on creation (or after), it doesn't seem like mongodb is good for images, what would anyone recommend for implementing a recipe image upload?

Need help with picking the right tools for a project

Hi there, I need to implement a new project based around currently existing solutions in my company. I want to implement t3-app as a form of dashboard between environments. Tldr I have prepared a short description in the form of an image. I would like to talk about all sorts of possibilities, suggestions for a solution welcome, if anyone has already encountered something like this....

Protected routing premium user

I want to implement protected routes where a user needs to have a "premium" account to access it. How can i do this? I have implemented normal protected routes using getServerSideProps already...

SOLVED | NextAuth build error | CLIENT_FETCH_ERROR

I have a t3 app which works fine when running it via npm run dev. However it does not work when i run it via npm run start. I just get this information shown on the website whenever i try to access the log in page. Any thought?...

t3 app doesn't work offline

In the older versions before this renaming and from trpc. To api. I could work offline (turning off my wifi connection) using my local database on my machine But of recent i have observed that the whole app doesn't read or write when they is no network connection But once i connect to the internet it automatically loads everything and gets in sync with all the queries etc made offline...

register limited people

hey, im working on a project that only allow few invited people to register and then use my website. is there a way to do that? thanks in advance...

how to stop app from console.log every query mutation made to the use console

Hi whenever a query or a mutation is made it's been console.log to user I want to disable that i have tried setting my node env to production still didn't work i hv tried other things too still didn't work any suggestions?...

SWR or React Query

Does anyone know when to pick either SWR or React Query? Also, have theo already mentioned this kind of topic?

Need help with typescript stuff

I am trying to implement the Maybe monad in typescript. It's like the Option type in Rust. Here's what I have so far: ```ts const None = Symbol("None");...

tRPC middleware

I tried doing what I saw here, but since t3 is typescript it doesn’t allow null. Has anyone done something like this?

looking for t3 project collaborators

Hi, I have several side projects (all in t3 stack) and I'm looking for collaborators. They are: - A daily writing challenge app - A focus and productivity app - A code snippets saver...

tRPC in getServerSideProps

this is the code im writing in the getServerSideProps ```export const getServerSideProps = async (context: any) => { const session = await getSession(context) const { id: shopId } = context.query...

use query results in state

Hi, I want to query my database for routes, and then set the DashboardState with the data from the query result. How can I do this? ```interface DashboardState { isNewRouteModalOpen: boolean; isEditRouteModalOpen: boolean;...

Underscore variable is still triggering eslint `no-unused-vars`. Why?

How can I optimize this code so that this eslint rule wort triggger?

Protected Routes

How do you create your Protected Routes? I've seen a lot of suggestions to use middleware, but for that, I need a JWT, and I use server cookies (which is probably safer - or should I rush the JWT?) However, I am not talking about the fact that the user is redirected from the protected page if he/she is not logged in. I mean, I need more advanced filtering....