This project was bootstrapped with Create React App.
In your project directory type the following commande
npm install very-simple-table-lib
- Easy to use
- Number of entries per page
- Sorting
- Search field
- Jump page
import Table from 'very-simple-table-lib/dist/components/Table'
then you need to pass data in JSON format and an object containing what data to display and the corresponding thead in this fashion
const yourJSON = {people:[
{
"firstName": "me",
"lastName": "you",
"dateOfBirth": "tommorow",
"country": "international waters"
},
....
]}
now you choose what data you want to display on the table and in what order
const keys = {country: "Country column", firstName: "First name column"}
return <Table data={yourJSON} keys={dataToShow}/>
output:
Country column | First name column |
---|---|
international waters | me |
... | ... |
Code available at Github