Trung BìnhNext.js iconNext.js

Revalidation sau mutation trong Server Actions?

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.

Xem toàn bộ Next.js cùng filter theo level & chủ đề con.

Mở danh sách Next.js