百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-simple-pull-to-refresh

> 编程语言
开源

npm install react-simple-pull-to-refresh

191 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

npm install react-simple-pull-to-refresh

react-simple-pull-to-refresh

A Simple Pull-To-Refresh Component for React Application with 0 dependency. Works for Mobile and Desktop.

Contributing

⚠️ I don't have much time to take care of the issues at the moment.

Any help and contribution is greatly appreciated.

Demo

Click here

Installation

npm i react-simple-pull-to-refresh

Usage

javascript
import PullToRefresh from 'react-simple-pull-to-refresh';

Pull To Refresh only

javascript
// ...

return (
  
    

      {list.map((item, index) => (
        
{item}

      ))}
    

  
);

// ...

Pull To Refresh and Fetch More enabled

javascript
// ...

return (
  
    

      {list.map((item, index) => (
        
{item}

      ))}
    

  
);

// ...

Props Matrix

Name Type Required Default Description
isPullable boolean false true Enable or disable pulling feature
onRefresh () => Promise true Function called when Refresh Event has been trigerred
pullDownThreshold number false 67 Distance in pixel to pull to trigger a Refresh Event
maxPullDownDistance number false 95 Maximum transitionY applied to Children when dragging
resistance number false 1 Scale of difficulty to pull down
refreshingContent JSX.Element or string false Content displayed when Pulling or Fetch more has been trigerred
pullingContent JSX.Element or string false Content displayed when Pulling
canFetchMore boolean false false Enable or disable fetching more feature
onFetchMore () => Promise false Function called when Fetch more Event has been trigerred
fetchMoreThreshold number false 100 Distance in pixel from bottom of the container to trigger a Fetch more Event
backgroundColor string false Apply a backgroundColor
className string false

Changelog

1.3.4: Update package.json peerDependencies to support react 19 - (From: @redimongo)

1.3.3: Update package.json peerDependencies to support react 18 - (From: @mjauernig)

1.3.2: Fix build issue encountered with 1.3.1

1.3.1: Fix issue preventing fixed elements to work properly - (From: @ManuDoni)

1.3.0: Add a resistance prop, that allows to adjust the pull down difficulty - (From: @joshuahiggins)

1.2.5: Fix event listenter leaks - (From: @d-s-x)

1.2.4: Fix overscroll on iOS Safari - (From: @d-s-x)

1.2.3: Add React 17+ as valid peer dependencies - (From: @Felixmosh)

1.2.2: Remove non-null assertion operators from ref.current + TouchEvent check for Mozilla - (From: @HamAndRock)

1.2.1: Remove unnecessary z-index

1.2.0: onRefresh and onFetchMore now require to be of type () => Promise

1.1.2: Bind Scroll event to Window

1.1.0: Check for "canFetchMore" value for each scroll events.

1.1.0: Add a Fetch More feature

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言