Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
Displaying data from API

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!