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

@nuonuonuonuoyan/react-infinite-scroll

v1.0.70

Published

无限滚动加载列表

Readme

示例查看 http://qinwang.battlebanpick.com/infinite

安装

yarn add @nuonuonuonuoyan/react-infinite-scrollnpm i @nuonuonuonuoyan/react-infinite-scroll

import InfiniteScroll from '@nuonuonuonuoyan/react-infinite-scroll'

API

| 属性 | 说明 | 类型 | 默认值 | | ------------------------------------------------------------------------------ | --------------------------------------------------------- | --------------------------- | --------------- | | scrollWrapperClass | 列表容器的样式类 | string | - | | dataSource | 列表数据 | array | [] | | renderListItem | 渲染每一行的数据 | (item,index) => ReactNode | - | | service | 发起请求的接口 | () => Promise | - | | defaultParams | 发起自动请求时的默认参数 | object | {} | | onLoad | 首次加载的回调 | (res) => void | - | | mountLoadElement | 自定义首次加载提示内容 | ReactNode | - | | mountLoadClass | 首次加载的样式类(配合 mountLoadText 使用) | string | - | | mountLoadText | 首次加载的提示文案 | string | 首次加载... | | manual | 是否默认请求一次接口,如果设置为 true,则不会默认请求接口 | boolean | false | | canFirstLoad | 是否可以进行首次加载,需要配合 manual=true 使用 | boolean | false | | onSuccess | 加载成功的回调 | (res) => void | - | | onError | 加载失败的回调 | (res) => void | - | | onFinally | 不论成功失败都最终执行的回调 | (res) => void | - | | onLoadMore | 加载更多的回调 | async () => void | - | | loadMoreParams | 加载更多时上送给接口的参数 | object | {} | | requestParams | 是否默认请求一次接口,如果设置为 true,则不会默认请求接口 | boolean | false | | canFirstLoad | 是否可以进行首次加载,需要配合 manual=true 使用 | boolean | false | | loadMoreText | 加载更多时的文案展示 | string \| ReactNode | 正在全力加载... | | loadMoreElement | 自定义加载更多 | ReactNode | - | | loadMoreClass | 加载更多的样式类(配合 loadMoreText 使用) | string | - | | hasMore | 是否还有更多内容 | boolean | true | | noMoreElement | 自定义无更多内容 | ReactNode | - | | noMoreText | 无更多内容的文案 | (res) => void | 没有更多数据了 | | noMoreClass | 无更多内容的样式类(配合 noMoreText 使用) | string | - | | threshold | 触发加载事件的滚动触底距离阈值 | number | 50 | | isEmpty | 是否为空列表 | boolean | false | | emptyText | 空列表展示的文案 | string | - | | emptyTextClass | 空列表的样式类(配合 emptyText 使用) | string | - | | emptyElement | 自定义空列表 | ReactNode | - |

requestParams

更多参数请移步 useRequest W