Ahmed Senousy
Ahmed Senousy
TTCTheo's Typesafe Cult
Created by m1aw on 9/19/2024 in #questions
Vercel deployment: [cause]: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
you are doing it correctly
12 replies
TTCTheo's Typesafe Cult
Created by m1aw on 9/19/2024 in #questions
Vercel deployment: [cause]: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
well... my suspicions were wrong 😅
12 replies
TTCTheo's Typesafe Cult
Created by m1aw on 9/19/2024 in #questions
Vercel deployment: [cause]: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
@m1aw can you show me you root layout.tsx? sometimes if you wrap ur root html tag with a provider like trpc provider or any other it crashes like this
12 replies
TTCTheo's Typesafe Cult
Created by james162861 on 8/16/2024 in #questions
Express-Like Auth Middleware Pattern For Server Actions?
I like to keep my auth logic in my service layer (backend) and keep my db for only r/w
11 replies
TTCTheo's Typesafe Cult
Created by james162861 on 8/16/2024 in #questions
Express-Like Auth Middleware Pattern For Server Actions?
I'm not a big fan of row level security but yes it can be done using that too ig
11 replies
TTCTheo's Typesafe Cult
Created by james162861 on 8/16/2024 in #questions
Express-Like Auth Middleware Pattern For Server Actions?
I fell in love once I saw it 😂❤️
11 replies
TTCTheo's Typesafe Cult
Created by james162861 on 8/16/2024 in #questions
Express-Like Auth Middleware Pattern For Server Actions?
yesss
11 replies
TTCTheo's Typesafe Cult
Created by aditya on 4/2/2024 in #questions
Query Invalidation with trpc not working with React Server Components and App Router
I guess if you want a "best practice" it would be: 1. page.tsx should be a server component 2. you call void api.whatever.whatever.prefetch() 3. you make a client component for displaying your content and wrap it with a <HydrateClient> which is the t3 custom <HydrationBoundary> 4. inside the client component you use <Suspense> for the parts you want to get streamed in from the server and you call const [data] = await api.whatever.whatever.useSuspenseQuery()
32 replies
TTCTheo's Typesafe Cult
Created by james162861 on 8/16/2024 in #questions
Express-Like Auth Middleware Pattern For Server Actions?
check this out. the first example is exactly the pattern u want
11 replies
TTCTheo's Typesafe Cult
Created by james162861 on 8/16/2024 in #questions
Express-Like Auth Middleware Pattern For Server Actions?
11 replies
TTCTheo's Typesafe Cult
Created by james162861 on 8/16/2024 in #questions
Express-Like Auth Middleware Pattern For Server Actions?
you can use a library like zsa for a trpc like experience
11 replies