Coder Social home page Coder Social logo

react-lazy-render's Introduction

React Lazy Render

Lazy render for (very) large lists of data

Demo

Features

  • Only render children that are visible
  • Incredibly simple to use
  • BYOC - Bring your own child components

Install

The easiest way to use React Lazy Render is to install it from NPM and include it in your own build process (using Webpack, Browserify, etc).

npm install react-lazy-render

Usage

var LazyRender = require('react-lazy-render');

var children = [];
for (var i = 0; i < 5000; i++) {
  // each child must have a consistent height
  children.push(
    <div style={{ height: 20 }}>
      #{i}
    </div>
  );
}

<LazyRender maxHeight={300} className="my-list" itemPadding={5}>
  {children}
</LazyRender>

Contribute

We love contributions! Whether it is a simple typo fix or a wholesale rewrite to Haskell we'll get it merged as soon as we can. If you can't think of anything to do you can see a list of tasks that can be worked on in the issues list.

Building example page

Once you have the repository cloned run the following commands to get started:

npm install
npm install -g webpack gulp // we use webpack to build the js for the example page

Then in one shell run gulp develop and in another webpack -w --colors --progress. This will start a local server at http://localhost:9988 where you can see the example page. It will also watch for any files changes and rebuild.

react-lazy-render's People

Contributors

jackcompton avatar jkimbo avatar stuartleigh avatar tehandyb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.