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

137
Views
React map inside map cloning on re-render

So I am rendering a map:

{categories.map((category, index) => {

and inside this map I am rendering another:

{challenges.map((challenge, index) => {

and they all render correctly but for example once I delete a challenge and call the getChallenges() (gets the challenges from server) which is what I also call at the first render with useEffect() it renders the categories properly but the challenges map inside the categories map gets doubled so I have the old & new ones. Anyway to prevent this or any way I can render the categories map and then the challenges map appending them to their correct category? Thanks for your help in advance I hope I was clear!

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

0

Solved because I was passing in an object as the 'key' so it was just [Object, Object] which made it not unique. Fixed by switching to challenge._id

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!