Nutritious Pomegranate Muffins
    Wondering what’s next for npm?Check out our public roadmap! »

    react-clusterize

    0.2.2 • Public • Published

    react-clusterize build status Coverage Status

    NPM

    React component for Clusterize.js

    Demo: https://cheton.github.io/react-clusterize

    Installation

    1. Install the latest version of react and react-clusterize:
    npm install --save react react-dom react-clusterize
    

    Usage

    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 #{+ 1}
            </div>
        );
    }
    rows.length = maxRows;
     
    const mountNode = document.getElementById('#container');
     
    ReactDOM.render(<Clusterize rows={rows} />, mountNode);

    API

    Properties

    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.

    License

    MIT

    Install

    npm i react-clusterize

    DownloadsWeekly Downloads

    107

    Version

    0.2.2

    License

    MIT

    Last publish

    Collaborators

    • avatar