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

165
Views
TypeError no capturado: no se pueden leer las propiedades de undefined (leyendo 'toString')

Estoy desarrollando una aplicación React y no sé cómo resolver este error. Estoy bastante seguro de que es de mi función useEffect, pero no puedo averiguar qué está mal. Cualquier ayuda sería muy apreciada, ¡gracias!

 const CourseTypeFour = ({ data, classes, bgWhite }) => { let { id } = data; const [courseObject, setCourseObject] = useState({}); useEffect(() => { axios.get(`http://localhost:3001/courses/${id}`).then((response) => { setCourseObject(response.data); }); },[id]); return ( ... ) } export default CourseTypeFour;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

El problema no está en esta parte del código. En error, puede ver que el problema es cuando intenta usar el método toString en una variable que no está undefined . Intenta encontrar parte del código donde usas el método toString , y antes ejecuta la función console.log con esta variable para ver qué hay dentro.

about 4 years ago · Juan Pablo Isaza Report
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!