{"id":4202,"url":"https://github.com/react-native-china/react-native-drop-refresh","last_synced_at":"2025-08-04T00:32:30.733Z","repository":{"id":57145023,"uuid":"55141377","full_name":"react-native-china/react-native-drop-refresh","owner":"react-native-china","description":"♻️   A pull down to refresh control for react native.","archived":false,"fork":true,"pushed_at":"2018-12-25T01:51:48.000Z","size":192,"stargazers_count":68,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-29T23:36:22.888Z","etag":null,"topics":["react-native","refresh"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Shuangzuan/RCTRefreshControl","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-native-china.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-31T10:19:45.000Z","updated_at":"2024-10-27T14:31:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/react-native-china/react-native-drop-refresh","commit_stats":null,"previous_names":["obooman/rctrefreshcontrol"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/react-native-china/react-native-drop-refresh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-china%2Freact-native-drop-refresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-china%2Freact-native-drop-refresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-china%2Freact-native-drop-refresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-china%2Freact-native-drop-refresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-native-china","download_url":"https://codeload.github.com/react-native-china/react-native-drop-refresh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-china%2Freact-native-drop-refresh/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268630353,"owners_count":24281198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react-native","refresh"],"created_at":"2024-01-05T20:17:04.344Z","updated_at":"2025-08-04T00:32:30.170Z","avatar_url":"https://github.com/react-native-china.png","language":"Objective-C","funding_links":[],"categories":["Components"],"sub_categories":["UI"],"readme":"# react-native-drop-refresh\n\nA pull down to refresh control for react native.\nThis is a fork version from [Shuangzuan/RCTRefreshControl](https://github.com/Shuangzuan/RCTRefreshControl).\n\nBetter npm maintainess,issues are welcomed.\n\n[![NPM](https://nodei.co/npm/react-native-drop-refresh.png)](https://nodei.co/npm/react-native-drop-refresh/)\n[![NPM](https://nodei.co/npm-dl/react-native-drop-refresh.png?months=9)](https://nodei.co/npm/react-native-drop-refresh/)\n\n####Update 2.2.0 \nSupport react-native 0.40.0, change CMD to ES6 syntax.\n\n####Update 2.1.0 \nSupport react-native 0.20.0, solve module name collsion issue.\n\n## Screen Shot\n\n![Screen Shot](screen-shot.gif)\n\n## Installation\n\n1. Run `npm install react-native-drop-refresh --save` in your project directory.\n2. Run `react-native link` to link the lib up.\n3. Add `import DropRefreshControl from 'react-native-drop-refresh';` to your code.\n\n## Usage\n\n```javascript\nimport React, { Component } from 'react';\nimport DropRefreshControl from 'react-native-drop-refresh';\n\nimport {\n  AppRegistry,\n  ListView,\n  ScrollView,\n  StyleSheet,\n  Text,\n  View\n} from 'react-native';\n\nvar SCROLLVIEW = 'ScrollView';\nvar LISTVIEW = 'ListView';\n\nclass RCTRefreshControlDemo extends Component{\n  constructor(){\n    var ds = new ListView.DataSource({rowHasChanged: (r1, r2) =\u003e r1 !== r2});\n    this.state = {\n      dataSource: ds.cloneWithRows(['#484848', '#2F9C0A', '#05A5D1']),\n    }\n  }\n\n  componentDidMount() {\n    // ScrollView\n    DropRefreshControl.configure({\n      node: this.refs[SCROLLVIEW],\n      tintColor: '#05A5D1',\n      activityIndicatorViewColor: '#05A5D1'\n    }, () =\u003e {\n      setTimeout(() =\u003e {\n        DropRefreshControl.endRefreshing(this.refs[SCROLLVIEW]);\n      }, 2000);\n    });\n\n    // ListView\n    DropRefreshControl.configure({\n      node: this.refs[LISTVIEW]\n    }, () =\u003e {\n      setTimeout(() =\u003e {\n        DropRefreshControl.endRefreshing(this.refs[LISTVIEW]);\n      }, 2000);\n    });\n  }\n\n  render() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cScrollView ref={SCROLLVIEW} style={styles.scrollView}\u003e\n          \u003cView style={{backgroundColor: '#05A5D1', height: 200}} /\u003e\n          \u003cView style={{backgroundColor: '#FDF3E7', height: 200}} /\u003e\n          \u003cView style={{backgroundColor: '#484848', height: 200}} /\u003e\n        \u003c/ScrollView\u003e\n\n        \u003cListView\n          ref={LISTVIEW}\n          style={styles.listView}\n          dataSource={this.state.dataSource}\n          renderRow={(rowData) =\u003e {\n            var color = rowData;\n            return (\n              \u003cView style={{backgroundColor: color, height: 200}} /\u003e\n            );\n          }}\n        /\u003e\n      \u003c/View\u003e\n    );\n  }\n};\n\nvar styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    flexDirection: 'row'\n  }\n});\n\nAppRegistry.registerComponent('DropRefreshControlDemo', () =\u003e DropRefreshControlDemo);\n// use `export default DropRefreshControlDemo` instead to use this as an component;\n```\n\n---\n\n## License\n\nAvailable under the MIT license. See the LICENSE file for more informatiion.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-china%2Freact-native-drop-refresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-native-china%2Freact-native-drop-refresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-china%2Freact-native-drop-refresh/lists"}