List with Bootstrap Table - React Js
App.js:
import React from "react";
import {Table} from 'react-bootstrap'
import './App.css'
function App()
{
const Student=[
{name:"Krishan", email:"krishan@gmail.com", Phone:1111},
{name:"Dev", email:"dev@gmail.com", Phone:2222},
{name:"Bhavesh", email:"bhavesh@gmail.com", Phone:3333},
{name:"Brijesh", email:"brijesh@gmail.com", Phone:4444}
];
return(
<div className="App">
<h1>Handle Array with List</h1>
<Table striped bordered hover>
<tbody>
<tr>
<td>Name</td>
<td>Email</td>
<td>Phone</td>
</tr>
{
Student.map((data, i)=>
<tr key={i}>
<td>{data.name}</td>
<td>{data.email}</td>
<td>{data.Phone}</td>
</tr>
)
}
</tbody>
</Table>
</div>
)
}
export default App;
Comments
Post a Comment