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

288
Views
How to access a <div> stored in an array in React?

I want to access a particular property of a div where a number of div is stored as as an array.

 ans[i] = (
  <>
    <div
      className="gantt1"
      key={arrivalTime[i]}
      style={{
        background: getColor(i),
        color: `white`,
        width: getWidth(i) + `%`,
      }}
    >
      P{i}
    </div>

    <div className="time_container">
      <div className="gantt_time">
        <div className="timeDisp">{calcualteBurst(i)}ms</div>
      </div>
    </div>
  </>
);

I want to change the value of <div className='timeDisp'>{calcualteBurst(i)}ms this later. So how can I access this particular property and modify it later in React?

about 4 years ago · Juan Pablo Isaza
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!