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

101
Views
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 answers
Answer question

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 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!