Coder Social home page Coder Social logo

samouss / react-infinite-scroll-list Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 2.0 2.25 MB

Manage infinite list with the IntersectionObserver API

Home Page: http://samouss.github.io/react-infinite-scroll-list

License: MIT License

JavaScript 95.01% CSS 4.71% HTML 0.28%
react infinite scroll infinite-scroll infinite-lists intersection-observer

react-infinite-scroll-list's Introduction

React Infinite List

npm version Build Status

Installation

yarn add react-infinite-scroll-list

Note: This library is based on the IntersectionObserver API, it's not yet widely supported. Check the compatibility table and add a Polyfill to your needs!

Check out the example on Storybook

Usage

Import the module in your application:

// From ES6
import InfiniteList from 'react-infinite-scroll-list';

// From CJS
const InfiniteList = require('react-infinite-scroll-list').default;

// From global
const InfiniteList = ReactInfiniteScrollList.default;

Then use it juste like that:

<InfiniteList
  root="container|viewport"
  isLoading={true | false}
  isEndReached={true | false}
  onReachThreshold={() => {
    console.log('Load more content');
  }}
  containerClassName="custom-container-class-name"
  sentinelClassName="custom-sentinel-class-name"
  containerTagName="div"
  sentinelTagName="div"
  threshold={0}
>
  {items.map(item => <div key={item.id}>{item.message}</div>)}
</InfiniteList>

Run Storybook

yarn start-storybook

Build Storybook

yarn build-storybook

Run the test

yarn test

react-infinite-scroll-list's People

Contributors

cy6eria avatar dependabot[bot] avatar renovate-bot avatar renovate[bot] avatar samouss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-infinite-scroll-list's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm babel-eslint Available
npm babel-preset-es2015 Unavailable
npm rollup-plugin-babel Available
npm rollup-plugin-commonjs Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @storybook/storybook-deployer to v2.8.16
  • chore(deps): update dependency enzyme-adapter-react-16 to v1.15.8
  • chore(deps): update dependency rollup-plugin-filesize to v9.1.2
  • chore(deps): update dependency prop-types to v15.8.1
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-config-prettier to v9
  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency prettier to v3
  • chore(deps): update dependency rollup to v4
  • chore(deps): update dependency rollup-plugin-filesize to v10
  • chore(deps): update react monorepo to v18 (major) (react, react-dom, react-test-renderer)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • @storybook/addon-options 3.4.12
  • @storybook/addons 3.4.12
  • @storybook/cli 3.4.12
  • @storybook/react 3.4.12
  • @storybook/storybook-deployer 2.8.10
  • babel-core 6.26.3
  • babel-eslint 10.1.0
  • babel-plugin-external-helpers 6.22.0
  • babel-plugin-transform-es2015-modules-commonjs 6.26.2
  • babel-preset-env 1.7.0
  • babel-preset-es2015 6.24.1
  • babel-preset-react 6.24.1
  • babel-preset-stage-2 6.24.1
  • babel-runtime 6.26.0
  • enzyme 3.11.0
  • enzyme-adapter-react-16 1.15.6
  • enzyme-to-json 3.6.2
  • eslint 6.8.0
  • eslint-config-airbnb 17.1.1
  • eslint-config-prettier 7.2.0
  • eslint-plugin-import 2.25.2
  • eslint-plugin-jsx-a11y 6.4.1
  • eslint-plugin-prettier 3.4.1
  • eslint-plugin-react 7.26.1
  • jest 23.6.0
  • prettier 1.19.1
  • prop-types 15.7.2
  • react 17.0.2
  • react-dom 17.0.2
  • react-test-renderer 17.0.2
  • rollup 2.58.0
  • rollup-plugin-babel 3.0.7
  • rollup-plugin-commonjs 10.1.0
  • rollup-plugin-filesize 9.1.1
  • rollup-plugin-uglify 6.0.4
  • prop-types ^15.0.0
  • react ^16.0.0 || ^17.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Dependency deprecation warning: babel-preset-es2015 (npm)

On registry https://registry.npmjs.org/, the "latest" version (v6.24.1) of dependency babel-preset-es2015 has the following deprecation notice:

๐Ÿ™Œ Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!

Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.

Please take the actions necessary to rename or substitute this deprecated package and commit to your base branch. If you wish to ignore this deprecation warning and continue using babel-preset-es2015 as-is, please add it to your ignoreDeps array in Renovate config before closing this issue, otherwise another issue will be recreated the next time Renovate runs.

Affected package file(s): package.json

Would you like to disable Renovate's deprecation warning issues? Add the following to your config:

"suppressNotifications": ["deprecationWarningIssues"]

Dependency deprecation warning: babel-preset-es2015 (npm)

On registry https://registry.npmjs.org, the "latest" version (v6.24.1) of dependency babel-preset-es2015 has the following deprecation notice:

๐Ÿ™Œ Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!

Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.

Please take the actions necessary to rename or substitute this deprecated package and commit to your base branch. If you wish to ignore this deprecation warning and continue using babel-preset-es2015 as-is, please add it to your ignoreDeps array in Renovate config before closing this issue, otherwise another issue will be recreated the next time Renovate runs.

Affected package file(s): package.json

Would you like to disable Renovate's deprecation warning issues? Add the following to your config:

"suppressNotifications": ["deprecationWarningIssues"]

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Dependency deprecation warning: babel-preset-es2015 (npm)

On registry https://registry.npmjs.org/, the "latest" version (v6.24.1) of dependency babel-preset-es2015 has the following deprecation notice:

๐Ÿ™Œ Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!

Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.

Please take the actions necessary to rename or substitute this deprecated package and commit to your base branch. If you wish to ignore this deprecation warning and continue using babel-preset-es2015 as-is, please add it to your ignoreDeps array in Renovate config before closing this issue, otherwise another issue will be recreated the next time Renovate runs.

Affected package file(s): package.json

Would you like to disable Renovate's deprecation warning issues? Add the following to your config:

"suppressNotifications": ["deprecationWarningIssues"]

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.