When you create data, you want to see that data reflected in your UI as quickly as possible. In our previous implementation we were doing that with react-query by invalidating it's cache so it would fetch customers again.
Using the revalidatePath
function from next/cache
in combination with our server action we can add a customer and see the must up-to-date data