# everscroll

> Infinite scroll

Latest version **1.4.0** (published 2015-12-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install everscroll
pnpm add everscroll
yarn add everscroll
bun add everscroll
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2015-12-12 |
| First published | 2015-12-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Maintainers | eiriklv |

## Links

- npm: https://www.npmjs.com/package/everscroll
- Repository: https://github.com/eiriklv/everscroll
- Issues: https://github.com/eiriklv/everscroll/issues
- npm.io page: https://npm.io/package/everscroll

## Recent versions

- 1.4.0 (latest) — 2015-12-12
- 1.3.1 — 2015-12-11
- 1.3.0 — 2015-12-11
- 1.2.0 — 2015-12-11
- 1.1.0 — 2015-12-11
- 1.0.2 — 2015-12-11
- 1.0.1 — 2015-12-11
- 1.0.0 — 2015-12-11

## README

Everscroll
----------

[![npm version](https://badge.fury.io/js/everscroll.svg)](http://badge.fury.io/js/everscroll)

Really simple infinite scroll library

Thanks to: https://github.com/alexblack/infinite-scroll

- No dependencies
- Tested in Chrome 17, IE7, Firefox 11, Android 2.3 Browser, iPad 2 with IOS5
- Handles touch events to respond before the end of the user's scroll on devices like the iPad

## Usage (vanilla with callback)

``` js
// setup
var infiniteScroll = require('everscroll')({
  distance: 50
});

// initiate
infiniteScroll(function(done) {
  // 1. fetch data from the server
  // 2. insert it into the document
  // 3. call done when we are done
  done();
});
```

## Usage (redux - without callback)
``` js
// setup
var infiniteScroll = require('everscroll')({
  distance: 50,
  disableCallback: true
});

// redux store
var store = configureStore({
  isLoadingNewData: false
});

// initiate
infiniteScroll(function() {
  if (store.getState().isLoadingNewData) {
    return;
  }

  // Dispatch an action creator to do data fetching and trigger a re-render
  // (NOTE: this action creator sequence should also set state.isLoadingNewData appropriately)
  store.dispatch(populateNextPage());
});
```

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