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

164
Views
List items get duplicated in React Native

I have the following code sequence where some calendar data is checked with scheduling data. The problem is that if there are 2 or more appointments, I get the rest duplicated, tripled. How can I change?

enter image description here

{ programari.map(val=>{

  if(val.date==selectedDate){
    if(val.hour==hour){
      return(
        <RadioButton.Item label={hour} value={hour} disabled={true} style={{backgroundColor:'red',opacity:0.4}} />
      )  
    }        
    else return <RadioButton.Item label={hour} value={hour} disabled={false} style={{backgroundColor:'green',opacity:0.4}} />
  }

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

0

Did you check the contents of programari? is you have duplicates in this list you will need to erase the duplicates. It is easy to avoid duplicates if somehow you use a set and from the set you create programari. On the other hand, shouldn't you consider minutes, too? Dominic also suggested the use of a Key and this is true. As key, you can use the index of the element in programari concatenated with something else to get a unique value.

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!