Is there a way to know if a promise is not being resolved?

前端 未结 0 1400
暗喜
暗喜 2021-01-27 19:41

I have this code:

let [totalPromos, setTotalPromos] = useState(0);

for (let item of cart.items){
    let response = await api.get(\'/products/\' + item.id);
             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题