score:0

const fetchData = () =>
new Promise((resolve,reject) => {
  arr.pop(1, 7);
  setProductObjsList(arr);
  resolve(arr);
});

score:1

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.14.0/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.14.0/umd/react-dom.production.min.js"></script>
<div id="main"></div>

Related Query

More Query from same tag