BI
In a situation where am not fetching data in the network, but fetching data from my local data array in my app (eg './contactData.js'). How do I change the code below to get the data const fetchData = async () => { const res = await fetch('https://api.opendota.com/api/heroes'); const json = await res.json(); setData(json); setHeroes(json.slice()); };