This package contains reusable React components, including the ReusableTable
component.
You can install the package from npm (once published):
npm install react-reusable-table-library
Import the components you need:
import { ReusableTable } from 'react-reusable-table-library';
const data = [
{ id: 1, name: 'John', age: 30 },
{ id: 2, name: 'Jane', age: 25 },
];
function App() {
return <ReusableTable data={data} title="User Data" />;
}
To build the package locally, run:
npm run build
This will create a dist
folder with the bundled files.
The package is configured to build with Rollup and output CommonJS and ES module formats.
Before publishing, ensure you are logged in to npm:
npm login
To publish the package, run:
npm publish --access public
Note: The package has peer dependencies on react
and react-dom
. Make sure these are installed in your consuming project.
MIT