JavaScript:
const [customers, setCustomers] = useState([]);
useEffect(() => {
axios.get("http://localhost:5043/api/Customers").then((response) => {
setCustomers(response.data);
});
}, [customers]);
Mình gọi api để lấy danh sách customer về thì các thuộc tính khác của customer đều có ngoại trừ ID của nó. Mình check response.data vẫn có ID
Mong được mọi người giải đáp. Xin cảm ơn
Mod: Đọc kỹ rule, bỏ code vào thẻ
Sửa lần cuối bởi điều hành viên:
.Để dependecies array là empty array nhé :v