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

203
Views
¿Cómo usar la tabla Bootstrap en reaccionar js?

Este es mi código de tabla del componente.

Quiero mostrar todos mis datos de la base de datos en formato de tabla. Cada vez que intento pasar datos a través de un componente, crearé muchas tablas iguales a la longitud de mis datos

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

0

const Component = () => { return ( <div> <Table striped bordered hover> <thead> <tr> <th>#</th> <th>Image</th> <th>Name</th> <th>Price</th> <th>Quantity</th> <th>Supplier</th> <th>About</th> </tr> </thead> <tbody> {items?.map((item, index) => ( <tr key={index}> <th>{parseInt(index) + 1}</th> <th>{item.image}</th> <th>{item.name}</th> <th>{item.price}</th> <th>{item.quantity}</th> <th>{item.supplier}</th> <th>{item.about}</th> </tr> ))} </tbody> </Table> </div> ); };
about 4 years ago · Juan Pablo Isaza Report

0

use la función de map en la etiqueta tbody

 <Table responsive> <thead className="custom"> ... </thead> <tbody> { items?.map((item, index) => { return <tr key={item.id}> <td>{index + 1}</td> <td>{item?.name}</td> </tr> }) } </tbody> </Table
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!