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

174
Views
¿Cómo usar y en la sección de propiedades del elemento html en reaccionar?

Tuve una situación como si el primer nombre existiera en el obj, necesito hacer un poco más de estilo para ese div, así que estoy pensando en usar un operador para reaccionar de esta manera, si el nombre existe, agregue la identificación al div, pero muestra un error

 <div {obj["name"][0] && id="feature-border"} className="rectangle"> </div>

¿Alguien puede ayudarme, cómo usar y en la sección de propiedades del elemento html en reaccionar?

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

<div {obj["name"][0] && id="feature-border"} className="rectangle"> </div>

Cambie esta línea de código a,

 <div id={obj["name"][0] ? "feature-border" : ""} className="rectangle"> </div>

O

 <div id={obj["name"][0] ? "feature-border" : null} className="rectangle"> </div>
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!