Skip to content

fdhani/react-eternal-list

 
 

Repository files navigation

react-eternal-list

This package can render infinite list items without memory issues as it is using binary tree algorithm to remove and display elements while scrolling. check the demo and see how it works!

NPM JavaScript Style Guide

Install

npm install --save react-eternal-list

Usage

import React, { Component } from 'react'

import ReactEternalList from 'react-eternal-list'

class Example extends Component {
  render () {
    return (
      <div className='YourApp'>
        <div className='YourList'>
          <ReactEternalList  
            list={} /* data ( Array of objects ) */
            updateRate={} /* Update rate ( Integer ) */ 
            onUpdate={} /* A Callback function which will get called when list visibility update ( Function ) */
            component={} /* A Function that should return Componet which you want to render as a list item ( Function ) */
          />
        </div>
      </div>
    )
  }
}

License

MIT © rinasm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 69.8%
  • CSS 26.9%
  • HTML 3.3%