Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2
Pull To Refresh for PWA React JS
License
NotificationsYou must be signed in to change notification settings
cuongdevjs/pull-to-refresh-react
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Pull To Refresh for Progressive Web Application (only Mobile) React JS
npm i pull-to-refresh-react
Link Demo (Turn on mobile mode)
importReact,{Component}from'react'importPullToRefreshfrom"pull-to-refresh-react";classAppextendsComponent{onRefresh(){returnnewPromise((resolve,reject)=>{setTimeout(()=>{resolve();},5000);});}test(){alert("click");}render(){return(<PullToRefreshoptions={{pullDownHeight:100}}onRefresh={this.onRefresh}><divstyle={{height:"500px",width:"100%",backgroundColor:"blur",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}}><div>Nguyen Manh Cuong - CuongStf</div><buttonstyle={{border:"1px solid black"}}onClick={()=>this.test()}> Event Disabled when refreshing</button></div></PullToRefresh>);}}
| Prop | Type | Default | Description |
|---|---|---|---|
| onRefresh | async function (required) | - | Function happend when onRefresh |
| textError | string (optional) | Error | Text display when error |
| textStart | string (optional) | Start | Text display when start touch |
| textReady | string (optional) | Ready | Text display when ready onRefresh |
| textRefresh | string (optional) | Refresh | Text display when refreshing |
| options | object (optional) | { pullDownHeight: 60 } | { pullDownHeight: height of Pull Down } |
Inspired fromvue-pull-refresh
MIT ©CuongStf
About
Pull To Refresh for PWA React JS
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.