jhegele
TTCTheo's Typesafe Cult
•Created by jhegele on 11/5/2023 in #questions
Server Component Data Revalidation
Hi all, searched and did not find a discussion on this yet but new here so apologies if I overlooked something.
I'm using the Beta version of T3 with Next app router. I have several instances where I'm mutating data on the client and subsequently sending the user back to a server component. When this happens, it looks like the server component does not revalidate the data as the old version is showing up (ex: I have a product list rendered as a server component, user clicks on product and is taken to product page which is a client component, user deletes product and is sent back to product list, the now deleted product is still present in the product list). Refreshing the page solves this but obviously that's not a great UX.
I can force revalidation every time the server component renders but that seems like overkill. Was wondering if anyone else has run across this and maybe had a better approach?
2 replies