skip to Main Content

React Native 'ERROR TypeError: Cannot convert undefined value to object'

I'm trying to retrieve data in this way: useEffect(() => { async function fetchData() { const response = await fetch('https://hasanadiguzel.com.tr/api/kurgetir'); const json = await response.json(); setData(json); } fetchData(); }, []); console.log(data.TCMB_AnlikKurBilgileri[0].Isim); When I run console.log(data.TCMB_AnlikKurBilgileri); upon opening the application, the…

VIEW QUESTION
Back To Top
Search