React
Grid.js has native React wrapper which can be used to create Grid.js instance in a React app. Use gridjs-react package to integrate your React app with Grid.js.
Install
npm install --save gridjs-react
Also, make sure you have Grid.js installed already as it's a peer dependency of gridjs-react
:
npm install --save gridjs
Usage
import { Grid } from 'gridjs-react';
<Grid
data={[
['John', 'john@example.com'],
['Mike', 'mike@gmail.com']
]}
columns={['Name', 'Email']}
search={true}
pagination={{
limit: 1,
}}
/>
Then you can pass all Grid.js configs to the Grid
component. See Grid.js Config for more details.
Example
Live Editor
Result
Loading...