@nicktomlin/react-table
v1.3.0
Published
A simple sortable table component for react
Downloads
8
Maintainers
Readme
React Table
A simple sortable table component for react.
Usage
npm i @nicktomlin/react-table
(not an npm user? see instructions below)
var React = require('react');
var ReactTable = require('react-table');
var data = [
{favoriteColor:'blue', age: 30, name: "Athos", job: "Musketeer"},
{favoriteColor: 'red' , age: 33, name: "Porthos", job: "Musketeer"},
{favoriteColor: 'blue' , age: 27, name: "Aramis", job: "Musketeer"},
{favoriteColor: 'orange' , age: 25, name: "d'Artagnan", job: "Guard"}
];
React.render(<ReactTable data={data} />, document.body);
See examples for a more full featured use case.
Usage without NPM
Include the built files in dist
with a <script>
tag or the module loader of your choice. React-table expects that React
is on the window and will not work without it.
Development
# watch js files and start example server
npm start
# run jest tests
npm test
# build for production
npm run build