Matt
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Matt on 7/10/2024 in #questions
Guidance on Client Refresh after Server Action
Hey all, just looking for some guidance or maybe a push in the right direction on how to handle the client side after a revalidatetag/revalidatepath options in a server component. I have the video below that's drawer component getting a promise passed to it then using React.use on the client.
Put some of the code below to follow all the way through but wanted to see if there's any thoughts. I'm initially thinking that it's not possible and have to use something client side like SWR but wanted to at least ask and see if anyone has something simple I'm just missing...
page.tsx
client-component.tsx
drawer-component.tsx
actions.ts
17 replies
DTDrizzle Team
•Created by Matt on 3/27/2024 in #help
Upsert Multiple Rows with Conflicts postgres
Is there a way to upsert multiple rows when there could be conflicts on some of the rows?
I have this code I tried below but spreading out the userValues in the set doesn't work of course, the usersValue is an array of users that could contain information about new users or existing users with new information. Is there a way to do it all in this one command or do I need to break it down before attempting the db insert?
13 replies