skip to Main Content

map is not a function react js – Reactjs

I am rendering a product list from dummyjson getting response from api but showing products.map() is not a function const fetchData = async () => { const response = await fetch("https://dummyjson.com/products"); const data = await response.json(); return setProducts(data); } useEffect(()…

VIEW QUESTION
Back To Top
Search