Simple html table using html-react-table NPM package

github logo ・1 min read

install this package using: npm install --save html-react-table

import ReactHtmlTable from 'html-react-table';

const columns = [{ key: 'id', name: 'ID' }, { key: 'title', name: 'Title' },
{ key: 'company', name: 'Company' }];

// in columns pass the header attribute of table

const rows = [{ id: x, title: 'Title x', company: 'Company x' }, ...];

// in rows pass the body json of table based on header attribute

const ReactTable = () => {
return columns={columns}
rows={rows}
/>);
}

for more info: https://www.npmjs.com/package/html-react-table

twitter logo DISCUSS
Classic DEV Post from Sep 15 '18

Alcohol and developer culture

A candid discussion on alcohol in the developer community. Is your company culture slowly murdering your employees?

Vikas Yadav profile image
I am professional ReactJs developer. I have worked in ReactJs, NodeJs, Python and ML.