Installation
TableNex is a modern React table component that’s easy to install and use. Here’s how to get it into your project.
Prerequisites
- - Node.js: 14.x or higher with npm.
- - React: 16.8 or higher.
- - A React project with npm or yarn.
Step 1: Install
Run this in your project directory:
Terminal
npm install react-tablenex
Step 2: Import
Add this to your component file:
JavaScript
import TableNex from "react-tablenex";
Step 3: Styling (Optional)
TableNex includes built-in CSS. For static sites or server-side rendering, import it for instant loading:
JavaScript
import "react-tablenex/style.css";
Quick Start Example
Here's a simple table to get you started:
JavaScript
import TableNex from "react-tablenex";
import "react-tablenex/style.css";
const App = () => {
const data = [
{ id: 1, name: "Alice", age: 25 },
{ id: 2, name: "Bob", age: 30 },
];
return <TableNex data={data} />;
};
export default App;
Compatibility
Works with Create React App, Next.js, Vite, and TypeScript projects.
Troubleshooting
- - Module not found: Check `npm install` and `node_modules`.
- - Styles delayed: Import the CSS file for SSR.