Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

107
Vistas
Reactjs warns of list needing unique key props but can't find duplicate or absentee?

As the title says, I have provided a key to every component and I believe they are unique. To reproduce this as simply as possible, I'm providing a snapshot of the rendered components with IDs that show no duplicates or absentees. This is taken from the react dev console and shows that keys are being picked up correctly for each component.

snapshot of components

The second Step is throwing the following error:

Warning: Each child in a list should have a unique "key" prop.

I'm not having an functional issues but I do want to make sure I'm not doing anything wrong.

The only luck I've had so far is when removing the Marker component. The error disappears. However, all the sub levels have keys too, including Marker, so I can't make sense of this outcome.

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

The answer was something I'd overlooked:

<Step>
    <StepPropGroup />
    <StepPropGroup />
    <React.Fragment>
        <Marker />
        <StepPropComment />
    </React.Fragment>
</Step>

React.Fragments can also have keys. I was so unaware of this that I didn't even think of mentioning it as it was superfluous. However, adding a key to it now resolves the error.

about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda