Sau khi mutate data trong Server Action, cần revalidate cache để UI cập nhật: revalidatePath('/posts') invalidate cached route, revalidateTag('posts') invalidate theo tag. redirect('/path') để điều hướng sau action thành công.
After mutating data in a Server Action, revalidate the cache so the UI reflects the change: revalidatePath('/posts') invalidates a specific cached route, and revalidateTag('posts') invalidates all cache entries with that tag.
Use redirect('/path') to navigate after a successful action.