bythewayitsjosh
bythewayitsjosh
TTCTheo's Typesafe Cult
Created by bythewayitsjosh on 6/23/2024 in #questions
trpc with Server Actions
Is it worth creating a trpc server purely for database queries, and then having mutations run by server actions? Originally I thought that server actions would cover everything, but I know they're specifically not recommended for querying data, only mutating. However, I'm not sure if having a trpc server alongside that would be complicated from a DX point of view? Not sure if I've explained that well, happy to clarify if needed.
6 replies
TTCTheo's Typesafe Cult
Created by bythewayitsjosh on 4/26/2024 in #questions
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.
14 replies
TTCTheo's Typesafe Cult
Created by bythewayitsjosh on 4/22/2024 in #questions
Choosing a React stack
I'm sure this has been asked before, but I'm struggling to find any comprehensive answers / advice. Apologies if this is very old ground. I'm trying weigh up the dis/advantages of various different toolchains within the React ecosystem. The big ones are Next, Remix, Astro. There are also more lightweight tools such as Vite, combined with the new Tanstack Router and something like Convex. Rather than delve into the details of each of the tools per sé, I wonder if people would be able to provide any guidance on what to look for when choosing a setup. Obviously this will depend on the product that's being built, but general questions, things to ensure are covered etc. would be really appreciated. Apologies if that's a little too vague, there are a lot of tools out there, and even with the experience I've had, choosing a tech stack isn't something I'm particularly familiar with within the React ecosystem. P.s. Obviously there is the T3 Stack, which is amazing, but I don't think anyone is pretending that Next is perfect for all situations, so would be good to know what to consider.
42 replies
TTCTheo's Typesafe Cult
Created by bythewayitsjosh on 4/8/2024 in #questions
How would you define 'Confidence' in testing? (Unit / Integration / E2E / Whatever)
As titled. Most people claim that the purpose of testing is to maintain / improve 'confidence'. But...confidence in what exactly? I have some thoughts but would be good to get some other opinions. I'm not in huge agreement with Theo's general take, but him being much smarter and more experienced in this stuff than me, it would be interesting to understand why he (and others) seem to avoid testing as a rule, particularly unit testing.
3 replies