riccardolardi
Explore posts from serversPPrisma
•Created by riccardolardi on 7/25/2024 in #help-and-questions
findMany where first/latest of 1:n relation meets certain condition
Bump... pseudo code could look like this:
3 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 6/7/2023 in #questions
React guarantee updated state variable
I see. My usecase is a bit different than in the contrived example I gave. The state is in a context and is checked somewhere else, not directly referenced. It does "seem" to work so far
15 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 6/7/2023 in #questions
React guarantee updated state variable
why?
15 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 6/7/2023 in #questions
React guarantee updated state variable
@barry thanks. Ugly hack would be to use a
setTimeout
to bypass react state update cycle15 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 4/22/2023 in #questions
Prisma nested write issue
8 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 4/22/2023 in #questions
Prisma nested write issue
@joerambo sure here you go
8 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 4/22/2023 in #questions
Prisma nested write issue
I figured it out with the help of Prisma support:
8 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 4/22/2023 in #questions
Prisma nested write issue
@joerambo the error still remains. I'm completely dazzled why this doesn't work
8 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 3/31/2023 in #questions
Global data fetching
You can't use gSSP / gSP in
_app.tsx
(where one could pass data down to children or store it in global state for everyone to consume)10 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 3/31/2023 in #questions
Global data fetching
This makes sense for client-side data fetching but what if I needed the data already on server side to populate the pages / components before getting the response back?
10 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 3/30/2023 in #questions
Basic app architecture question for Auth/session state retrieval & storage
@barry I solved the infinite loop problem using
useEffect
see my updated original question. Now the question is just about the pattern really. Whether this is a common pattern and if there's a better practice of handling such case33 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 3/30/2023 in #questions
Basic app architecture question for Auth/session state retrieval & storage
no because it's outside of supabase
<SessionContextProvider>
. That's why I use the renderless <AuthStateGrabber>
component33 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 3/30/2023 in #questions
Basic app architecture question for Auth/session state retrieval & storage
no. just a different table
33 replies
TTCTheo's Typesafe Cult
•Created by riccardolardi on 3/30/2023 in #questions
Basic app architecture question for Auth/session state retrieval & storage
it's a renderless component
33 replies