Mocha
TTCTheo's Typesafe Cult
•Created by Peform on 4/28/2025 in #questions
mutation taking a long time to appear after prefetching query
Yes,
data.error
won't behave like you expect it to. Using error.tsx will allow you to show an error message.
What I like to do instead is to just return the error as a value. This gets rid of many unexpected behaviors.
Also if your Content component really looks like that, you don't need it to be a Client Component.11 replies
TTCTheo's Typesafe Cult
•Created by Peform on 4/28/2025 in #questions
mutation taking a long time to appear after prefetching query
Also handle
if (...) redirect()
before prefetch()
not after it11 replies
TTCTheo's Typesafe Cult
•Created by Peform on 4/28/2025 in #questions
mutation taking a long time to appear after prefetching query
Notice how there's no
error
or isLoading
with useSuspenseQuery
because both are handled by the parent's Suspense
Handle loading with fallback='Loading...'
or with a loading.tsx
file
Handle errors with error.tsx
files11 replies
TTCTheo's Typesafe Cult
•Created by Peform on 4/28/2025 in #questions
mutation taking a long time to appear after prefetching query
There are 2 ways you can use prefetch.
First, call prefetch from the parent (must be server).
Then use the query from either a client or server component.
or
11 replies
TTCTheo's Typesafe Cult
•Created by Peform on 4/28/2025 in #questions
mutation taking a long time to appear after prefetching query
11 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 8/26/2024 in #questions
Migrating from T3 to T3 Turborepo
That makes senese. I've got Apple Silicon too.
13 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 8/26/2024 in #questions
Migrating from T3 to T3 Turborepo
I can't share the source code, but the problem I'm having is probably with the new setup requiring the
/packages
folder. I'll search for a newer guide.13 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 8/26/2024 in #questions
Migrating from T3 to T3 Turborepo
13 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 8/26/2024 in #questions
Migrating from T3 to T3 Turborepo
Thanks! Seems like a lot has changed since then, so it's been taking me a little more than two hours. It links to some nonexistent files.
I'm using Clerk and Drizzle. They assume NextAuth and Prisma.
I'm getting this error when trying to run the root turbo install.
13 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 5/13/2024 in #questions
Next.js API Type Safety without tRPC?
TanStack libraries are awesome. Do you have some sample code or article that talks about this setup? Seems to me that the library works best either with tRPC or with external APIs. I haven't been able to find the "define a function and call it" experience anywhere else.
10 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 5/13/2024 in #questions
Next.js API Type Safety without tRPC?
It was this issue that's currently fixed, but I just prefer not having a dependency if I don't really need it. If I could achieve almost the same results without tRPC, then it's better to remove this layer and keep the setup simple to develop and to debug
10 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 5/12/2024 in #questions
[TRPCClientError]: Converting circular structure to JSON
idk what the issue was, but I recreated the setup and it works now
9 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 5/13/2024 in #questions
Next.js API Type Safety without tRPC?
Yes, but I'm talking about things other than Server Actions. They're not ideal for everything. That's why people still use tRPC with App Router.
10 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 5/13/2024 in #questions
Next.js API Type Safety without tRPC?
Yes, but I'm asking about the client side
10 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 5/12/2024 in #questions
[TRPCClientError]: Converting circular structure to JSON
For context, here's my
createTRPCContext
:
And supabase
is exported from:
9 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 5/12/2024 in #questions
[TRPCClientError]: Converting circular structure to JSON
Yes, but I didn't know where to start looking, especially since everything has been working fine for weeks without touching the code or anything around the code.
It's a deeper issue that occurs at this function
so I updated the code. It still gave me an error, but the error is just the ctx object that I passed, so we don't know what it actually is
9 replies
TTCTheo's Typesafe Cult
•Created by beebae on 5/13/2024 in #questions
project idea suggestion?
Resizing, removing backgrounds, converting types, SVG to image
5 replies
TTCTheo's Typesafe Cult
•Created by WellDon on 5/12/2024 in #questions
Have you tried mentorship
What's your goal?
2 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 5/12/2024 in #questions
[TRPCClientError]: Converting circular structure to JSON
And sometimes I get this in server logs:
9 replies
TTCTheo's Typesafe Cult
•Created by Huilen on 3/31/2024 in #questions
Im a newbie creating a document editor and idk how to setup an architecture to save the data
Yes, especially if this is a personal project, please ignore that and just try to ship something functional as soon as you can. Nothing else matters before production. You can always optimize later, when you know more about what you wanna do!
16 replies