React component for Clusterize.js
Demo: https://cheton.github.io/react-clusterize
- Install the latest version of react and react-clusterize:
npm install --save react react-dom react-clusterize
import React from 'react';
import ReactDOM from 'react-dom';
import Clusterize from 'react-clusterize';
const rows = [];
const maxRows = 10000;
for (let i = 0; i < maxRows; ++i) {
rows[i] = (
<div style={{ borderBottom: '1px solid #f0f0f0', padding: '5px 10px' }}>
Item #{i + 1}
</div>
);
}
rows.length = maxRows;
const mountNode = document.getElementById('#container');
ReactDOM.render(<Clusterize rows={rows} />, mountNode);
Name | Type | Default | Description |
---|---|---|---|
rows | array | [] | An array of React elements or HTML tags in String. |
scrollTop | number | 0 | Set the current vertical position of the scroll bar. |
MIT