I'm trying to learn a little bit of react so I'm building this randon quote machine who gets the data from an API:
function App() {
const [quoteData,setQuoteData] = useState({})
useEffect(() => {
fetch('https://type.fit/api/quotes')
.then(res => res.json())
.then(data => setQuoteData(data))
},[])
My problem is when I'm tryin to display the quote by accessing it with quoteData[0].text it gives me an error specifically Uncaught TypeError