Help Data Fetch in Client Side
Unanswered
Polar bear posted this in #help-forum
Polar bearOP
10 Replies
Cape horse mackerel
useEffect(() => {
async function fetchData() {
const res = await fetch('yourUrl');
const { products } = await res.json();
setProducts(products);
}
fetchData();
}, [])Polar bearOP
Ok
Polar bearOP
@Cape horse mackerel Sir not Output
Not Fetch Data
because nothing in https://dummyjson.com/projects
Cape horse mackerel
your link is wrong
- https://dummyjson.com/projects
+ https://dummyjson.com/productsPolar bearOP
Ok