Khi nào bạn sử dụng 1 class component thay vì 1 functional component?

{{FormatNumbertoThousand(model.total_like)}} lượt thích
3.059 lượt xem

Nếu component của bạn có state hoặc các lifecycle method, sử dụng 1 class component, ngược lại, dùng 1 functional component.

{{login.error}}