Gathering detailed insights and metrics for @writeroo/react-simple-pull-to-refresh
Gathering detailed insights and metrics for @writeroo/react-simple-pull-to-refresh
Gathering detailed insights and metrics for @writeroo/react-simple-pull-to-refresh
Gathering detailed insights and metrics for @writeroo/react-simple-pull-to-refresh
npm install react-simple-pull-to-refresh
npm install @writeroo/react-simple-pull-to-refresh
Typescript
Module System
Node Version
NPM Version
69.2
Supply Chain
93.3
Quality
75
Maintenance
100
Vulnerability
100
License
TypeScript (52.1%)
JavaScript (34.11%)
CSS (4.97%)
SCSS (4.89%)
HTML (3.92%)
Total Downloads
2,871
Last Day
11
Last Week
86
Last Month
300
Last Year
1,876
MIT License
119 Commits
2 Branches
1 Contributors
Updated on Mar 30, 2023
Minified
Minified + Gzipped
Latest Version
1.3.3
Package Id
@writeroo/react-simple-pull-to-refresh@1.3.3
Unpacked Size
37.37 kB
Size
6.87 kB
File Count
11
NPM Version
9.6.0
Node Version
18.12.1
Published on
Mar 30, 2023
Cumulative downloads
Total Downloads
Last Day
37.5%
11
Compared to previous day
Last Week
-33.3%
86
Compared to previous week
Last Month
-18%
300
Compared to previous month
Last Year
106.8%
1,876
Compared to previous year
A Simple Pull-To-Refresh Component for React Application with 0 dependency. Works for Mobile and Desktop.
⚠️ I don't have much time to take care of the issues at the moment.
🙏 Any help and contribution is greatly appreciated.
npm i react-simple-pull-to-refresh
1import PullToRefresh from 'react-simple-pull-to-refresh';
Pull To Refresh only
1// ... 2 3return ( 4 <PullToRefresh onRefresh={handleRefresh}> 5 <ul> 6 {list.map((item, index) => ( 7 <li key={index}>{item}</li> 8 ))} 9 </ul> 10 </PullToRefresh> 11); 12 13// ...
Pull To Refresh and Fetch More enabled
1// ... 2 3return ( 4 <PullToRefresh onRefresh={handleRefresh} canFetchMore={true} onFetchMore={handleFetchMore}> 5 <ul> 6 {list.map((item, index) => ( 7 <li key={index}>{item}</li> 8 ))} 9 </ul> 10 </PullToRefresh> 11); 12 13// ...
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 |
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
No vulnerabilities found.
No security vulnerabilities found.