import React, { useEffect, useState } from "react"; import axios from "axios"; import "./App.css"; const App = () => { const [allProducts, setAllProducts] = useState([]); const getProducts = async () => { try { const res = await axios.get("http://172.16.2.99/api/products"); setAllProducts(res.data); } catch (error) { console.log(error); } }; useEffect(() => { getProducts(); }, []); return (
PID: {pro.PID}
VID: {pro.VID}
File: {pro.fileName}
Warehouse: {pro.warehouse}