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

148
Views
Cómo resolver el problema de Advertencia: cada niño en una lista debe tener un accesorio de "clave" único, incluso si estoy usando accesorios clave

Aquí está mi código

 return ( <ScrollView> <View style={{ padding: 10, flex: 1 }}> {listing.map((listing) => ( <> <View style={styles.containerOne} key={listing.snome_id}> <View id="listing" style={styles.containerTwo} > <Text style={{ margin: 15, marginTop: 20 }}> {listing.header} </Text> {listing.url.map((url) => ( <Image style={styles.pic} source={{ uri: url }} /> ))} <Text style={{ margin: 15, marginTop: 20 }}> {' '} {listing.description} </Text> </View> </View> </> ))} </View> </ScrollView> );

Estoy tratando de ver varios listados y la imagen correspondiente y algo de texto. Parece que a pesar de que estoy usando un accesorio clave en el componente de vista, todavía me arroja un error y no estoy seguro de la razón detrás de eso.

Espero que alguien pueda ayudarme a resolver este problema.

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

0

La clave siempre debe proporcionarse al componente de nivel superior creado por la función de mapa. En su código, ese es el Fragmento. Tendrás que reemplazar esto:

 <> <View style={styles.containerOne} key={listing.snome_id}> ... </>

Con este:

 <React.Fragment key={listing.snome_id}> <View style={styles.containerOne}> ... </React.Fragment>
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!