# react-stateless-infinite-scroll

> The real react infinite scroll component

Latest version **4.1.0** (published 2017-06-26) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install react-stateless-infinite-scroll
pnpm add react-stateless-infinite-scroll
yarn add react-stateless-infinite-scroll
bun add react-stateless-infinite-scroll
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2017-06-26 |
| First published | 2016-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Florian Bonniec |
| Maintainers | alex_xeonys, fbonniec, didierfranc, lfalorni |
| Keywords | xeonys, react, redux, stateless, infinite, scroll |

## Links

- npm: https://www.npmjs.com/package/react-stateless-infinite-scroll
- Repository: https://github.com/xeonys/react-stateless-infinite-scroll
- Homepage: https://github.com/xeonys/react-stateless-infinite-scroll#readme
- Issues: https://github.com/xeonys/react-stateless-infinite-scroll/issues
- npm.io page: https://npm.io/package/react-stateless-infinite-scroll

## Dependencies (3)

- [uuid](https://npm.io/package/uuid.md) ^3.0.1
- [react](https://npm.io/package/react.md) ~15.4.0
- [react-dom](https://npm.io/package/react-dom.md) ~15.4.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 4.1.0 (latest) — 2017-06-26
- 4.0.1 — 2017-06-13
- 4.0.0 — 2017-06-07
- 3.0.1 — 2017-05-17
- 3.0.0 — 2017-05-15
- 2.0.0 — 2016-10-07
- 1.1.2 — 2016-09-22
- 1.1.1 — 2016-09-22
- 1.1.0 — 2016-08-07
- 1.0.1 — 2016-08-04
- 1.0.0 — 2016-08-03

## README

### [Live](https://xeonys.github.io/react-showroom/#scroll)

## react-stateless-infinite-scroll

The best react infinite scroll component, on earth 🌍

### Usage

##### Install

```
npm install -S react-stateless-infinite-scroll
```

##### How to

```jsx
import React from 'react'
import InfiniteScroll from 'react-stateless-infinite-scroll'

const Component = (props) => {

  const infiniteActions = {
    loadMore,
  }

  const infiniteState = {
    hasMore,
    loading,
    error,
  }

  const infiniteCustoms = {
    spinner: <CustomSpinner />,
    reloader: <CustomReloader />,
  }

  const infiniteOptions = {
    threshold: 100,
  }

  const infiniteStyle = {
    height: 300,
  }

  return (
    <InfiniteScroll
      actions={infiniteActions}
      state={infiniteState}
      customs={infiniteCustoms}
      options={infiniteOptions}
      style={infiniteStyle}
    >
     {items.map((item, index) => <Item item={item} key={index} />)}
    </InfiniteScroll>
  )
}
```

##### PropTypes

```jsx
  InfiniteScroll.propTypes = {
    children: React.PropTypes.node,
    style: React.PropTypes.shape({}),
    options: React.PropTypes.shape({
      threshold: React.PropTypes.number,
    }),
    actions: React.PropTypes.shape({
      loadMore: React.PropTypes.func.isRequired,
    }).isRequired,
    state: React.PropTypes.shape({
      hasMore: React.PropTypes.bool.isRequired,
      loading: React.PropTypes.bool.isRequired,
      error: React.PropTypes.bool.isRequired,
    }).isRequired,
    customs: React.PropTypes.shape({
      spinner: React.PropTypes.node,
      reloader: React.PropTypes.node,
    }),
  }
```

---
_Source: https://npm.io/package/react-stateless-infinite-scroll · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
