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

126
Views
Mi mapa me da No se pueden leer propiedades de indefinido (leyendo 'mapa')

Intento hacer un mapa de mis diferentes personas pero me da error en el titulo

Realmente no entiendo y ahí está mi código:

 export const Testt = ({ childs}) => { console.log(childs) return childs.map((element, index) => ( //element <div> zdijiziojzadioj </div> ) ) }

y ahí están mis hijos

 (12) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}] 0: {_id: '619e7301e74b007f5c62482d', firstName: '', lastName: '', birth: '2020-11-19', genre: 'male', …} 1: {_id: '619fae3c96f85d2415d8fe24', firstName: '', lastName: '', birth: '2021-11-03', genre: 'male', …} 2: {_id: '619fae5296f85d2415d8fe28', firstName: '', lastName: '', birth: '2021-11-04', genre: 'male', …} 3: {_id: '619faec296f85d2415d8fe39', firstName: '', lastName: '', birth: '2021-11-04', genre: 'male', …} 4: {_id: '619faee196f85d2415d8fe40', firstName: '', lastName: '', birth: '2021-11-04', genre: 'male', …} 5: {_id: '619faf1496f85d2415d8fe4e', firstName: '', lastName: '', birth: '2021-11-04', genre: 'male', …} ... length: 12

No entiendo donde puede estar el problema, ya use el mapa pero nunca he tenido este problema,

¡Gracias por tu respuesta!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Probablemente significa que el valor childs no se completa en el renderizado inicial.

Lo que solemos hacer en React para eludir esto es agregar declaraciones condicionales.

Esto debería funcionar -

 export const Testt = ({ childs}) => { console.log(childs) return childs && childs.map((element, index) => ( //element <div> zdijiziojzadioj </div> )) }
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!