Explorar el Código

peremoga done

maryluis hace 4 años
padre
commit
0bff1643a7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      shop/src/components/goods.js

+ 1 - 1
shop/src/components/goods.js

@@ -21,7 +21,7 @@ const OneGood = ({className = "oneGood", image, name, price}) => {
   
   
   const Goods = ({className = "goods", state, goods = [], getData, id}) => {
-      useEffect(() => goods.length == 0 && getData(id), [id])
+      useEffect(() =>  getData(id), [id])
       console.log(goods)
       return(
           <>