Skip to content

SeonHyungJo/react-infinite-component

Repository files navigation

React Infinite Scroll Component

React Infinite Scroll Component

NPM JavaScript Style Guide

React Infinite Scroll Component

Install

npm install --save react-infinite-component

Usage

import * as React from 'react'

import InfiniteScroll from 'react-infinite-component'

class Example extends React.Component {
  render () {
    return (
      <InfiniteScroll loadingFunc={() => fetchDate()} hasMore={this.state.moreFlag} loader={<h4>로딩 중...</h4>}>
          <img src='https://images.unsplash.com/photo-1578763713067-ab058f88be3a?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixlib=rb-1.2.1&q=80&w=400' className={"innerDiv"} />
          <img src='https://images.unsplash.com/photo-1578483001364-b508612cde4a?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixlib=rb-1.2.1&q=80&w=400' className={"innerDiv"} />
      </InfiniteScroll>
    )
  }
}

License

MIT © 🐭snyung