npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

scroll-n-react

v0.0.1

Published

> A react component library... ## Description

Readme

Scroll-n-react

A react component library...

Description

Primary Objective

Scroll-n-react is a React Component Library for creating components that trigger functions at a certain scroll length. This is to create potentially infinite scrollers. There are other infinite scroller component libraries out ther but none that I have seen easily replicate features like the facebook messenger load more messages feature.

Demo TypeDocs


//Example you can check out in the example.tsx file. Just a real rough sketch of what using the component is like.
<ScrollRx onRef={ref => {this.child = ref}} height={300} loader={Wave2} threshold={0} width={250} getMore={this.Foo} anchorBottom component={K} fetching={this.state.fetching} dataArray={this.state.dataArray}/>

| Props | Purpose | type | | ------------- |:------------------:| -----:| | onRef | used to get a hold of the scroll instance to call its reset method | Function | | height | Required prop that sets the height of the scroller | Number | | width | Required prop that sets the width of the scroller | Number | |threshold | Determines how far from the top or bottom that the scroller triggers its getMore callback | Number |getMore | The callback that should fetch more data via ajax or any other method, it should provide new props to the dataArray prop | Function |anchorBottom/anchorTop | Determines the orientation of the scroller. Anchorbottom makes it act a lot like facebook messenger's chat scrollers | boolean |dataArray | Array of objects.Each object MUST HAVE AN id property. This is used to coordinate the key feature and main motivation for this project. The id is used to hold a placeholder to the last top element after more data comes in instead of pulling your view up along with the new data. | {id: any}Array |component | Stateless component which will be filled with the data from dataArray | Function |fetching | prop you pass in that will display or hide the loader component. Use in tandem with getMore | Boolean |loader | A loader component that will show up when fetching is set to true. I provide a default Loader, but you can use something like react-better-spintkit to provide a better loader. | Function