aether
TTCTheo's Typesafe Cult
•Created by shadax on 1/12/2025 in #questions
CSR, SSR or server components?
It depends on the data you are working with and how you design it to be. in general, either way would work however here's a bit of my own take.
The Easy Path
CSR/SPA. You get to do classic react, not a lot of the "hassle". If you've never used RSC before, it could give you crap for a while until you've figured out how things work. I would personally recommend to just use SPA, unless you are willing to pick things up during the project.
RSC. In my opinion, this would do you well if you need to fetch a lot of data/queries. Done correctly, with pre-fetch and proper decision on which should be SC and CC, it would give you very good performance overall.
I think the later would give you better/smoother interaction with the application (assuming proper implementation. But if you need to re-fetch / require interactions that fetch from an API, the first method is easier and faster.
Correct me if I'm wrong tho, would appreciate it.
9 replies
TTCTheo's Typesafe Cult
•Created by şiar_619 on 1/13/2025 in #questions
custom login page error
can you show me your navbar? where the login button is in
3 replies
TTCTheo's Typesafe Cult
•Created by Ben on 1/18/2023 in #questions
tRPC complaining about unsafe assignment of any on mutation
Adding into it, I usually do
prisma generate
into Restart TS Server
. Does the job most of the time. Or a prisma db push
into Restart TS Server
whichever does the job for me.12 replies
TTCTheo's Typesafe Cult
•Created by mcgrealife on 2/10/2023 in #questions
typescript-eslint/no-misused-promises: how to handle Promise<void> in event handlers?
Perfect timing, just solved this exact issue yesterday. Here's how I did it.
Basically we only need to add a
void
identifier inside the onClick, so your function would be something similar to onClick={() => void someAsyncFunctionReturningPromise()}
Give it a try and hope that helps!3 replies