{"id":17990644,"url":"https://github.com/little-buddy/react-native-mr-pullrefresh","last_synced_at":"2025-03-25T23:31:31.630Z","repository":{"id":192511800,"uuid":"686615607","full_name":"little-buddy/react-native-mr-pullrefresh","owner":"little-buddy","description":"Mr.pullrefresh is a pure javascript pull-refresh library for react-native. Support iOS、Android、Web 🎸","archived":false,"fork":false,"pushed_at":"2023-09-13T19:56:30.000Z","size":27617,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-20T22:35:50.309Z","etag":null,"topics":["android","ios","pullrefresh","react","react-native","web"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/little-buddy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-03T11:49:10.000Z","updated_at":"2025-01-18T21:57:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"a2f78a7b-356d-4e70-94cd-395cf2881755","html_url":"https://github.com/little-buddy/react-native-mr-pullrefresh","commit_stats":{"total_commits":73,"total_committers":2,"mean_commits":36.5,"dds":0.0547945205479452,"last_synced_commit":"551b414ad30dbd79a5b6becc979e40cdd4b27459"},"previous_names":["little-buddy/react-native-mr-pullrefresh"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-buddy%2Freact-native-mr-pullrefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-buddy%2Freact-native-mr-pullrefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-buddy%2Freact-native-mr-pullrefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-buddy%2Freact-native-mr-pullrefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/little-buddy","download_url":"https://codeload.github.com/little-buddy/react-native-mr-pullrefresh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245561669,"owners_count":20635786,"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","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":["android","ios","pullrefresh","react","react-native","web"],"created_at":"2024-10-29T19:18:42.263Z","updated_at":"2025-03-25T23:31:26.604Z","avatar_url":"https://github.com/little-buddy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-mr-pullrefresh\n\n![NPM](https://badgen.net/npm/v/react-native-mr-pullrefresh)\n![NPM](https://badgen.net/npm/dw/react-native-mr-pullrefresh)\n![MIT](https://badgen.net/static/license/MIT/red)\n![INSTALLED](https://badgen.net/packagephobia/install/react-native-mr-pullrefresh)\n![NODE](https://badgen.net/npm/node/react-native-mr-pullrefresh?color=purple)\n![STARS](https://badgen.net/github/stars/little-buddy/react-native-mr-pullrefresh?color=gray)\n\n\n```\n\n  /\\/\\  _ __        / _ \\_   _| | | /__\\ ___ / _|_ __ ___  ___| |__\n /    \\| '__|      / /_)/ | | | | |/ \\/// _ \\ |_| '__/ _ \\/ __| '_ \\\n/ /\\/\\ \\ |     _  / ___/| |_| | | / _  \\  __/  _| | |  __/\\__ \\ | | |\n\\/    \\/_|    (_) \\/     \\__,_|_|_\\/ \\_/\\___|_| |_|  \\___||___/_| |_|\n\n```\n\nreact-native pull refresh on iOS, Android and Web\n\n## 💪🏻 Support\n| Platform |             |   solved    |\n| -------- | ----------- | ----------- |\n| iOS      | ✅          |  🔥 Perfect      |\n| Android  | ✅          |  😂 Bottom response is bad  |\n| Web      | ✅          |  😭 Pulling and scrolling cant switch smoothly |\n\n| Library |             |\n| -------- | ----------- |\n| react-native-gesture-handler      | 2.x           |\n| react-native-reanimated  | 3.x |\n\n#### ⚠️ Warning\n`react-native-mr-pullrefresh` Only support wrapper `Animated.ScrollView` and `Animated.FlatList`\n\nnot support nested MrPullRefresh!\n\n## Installation\n\nIt relies on `react-native-gesture-handler` and `react-native-reanimated`\n\nso please install them before you use this package\n\n```sh\nyarn install react-native-gesture-hanlder react-native-reanimated\n```\n\n```sh\nyarn install react-native-mr-pullrefresh\n```\n\n## Usage\n\n```js\nimport { MrPullRefresh } from 'react-native-mr-pullrefresh';\n\n// ...\n\n \u003cMrPullRefresh\n  onPulldownRefresh={downLoader}\n  onPullupRefresh={upLoader}\n  pulldownHeight={80}\n  pullupHeight={100}\n  enablePullup\n\u003e\n\n  \u003cAnimated.FlatList\n    data={[]}\n    renderItem={() =\u003e null}\n  /\u003e\n\n {/* or*/}\n\n  \u003cAnimated.ScrollView\u003e\n    {/* children */}\n  \u003c/Animated.ScrollView\u003e\n\u003c/MrPullRefresh\u003e\n```\n\n## Example\n| \u003cimg src=\"./gifs/ios.gif\" alt=\"ios-example\" width=\"240\"\u003e |     \u003cimg src=\"./gifs/android.gif\" alt=\"ios-example\" width=\"250\"\u003e         |\n| :--------: | :-----------: |\n| iOS     |   Android        |\n\n\n## Props\n| props             | type      | description                                                  | Default  |\n| ----------------- | --------- | ------------------------------------------------------------ | -------- |\n| pulldownHeight    | Number    | The height of the drop-down load component is defined, and the judgment of the drop-down state depends on this value | 140      |\n| pullupHeight      | Number    | The height of the pull-up component is defined, and the pull-up state is determined by this value | 100      |\n| containerFactor   | Number    | The container factor is used to adjust the height of the refresh judgment | 0.5      |\n| pullingFactor     | Number    | Determine the coefficient of pulling state length            | 2.2        |\n| enablePullup      | Boolean   | whether show pullingupLoading                                | false    |\n| pulldownLoading   | Component | You can custom the Component                                 |          |\n| pullupLoading     | Component | You can custom the Component                                 |          |\n|                   |           |                                                              |          |\n| onPulldownRefresh | Function  | callback of pulling down refresh, load data with it          | ()=\u003evoid |\n| onPullupRefresh   | Function  | callback of pulling up refresh, load data with it            | ()=\u003evoid |\n\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-buddy%2Freact-native-mr-pullrefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flittle-buddy%2Freact-native-mr-pullrefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-buddy%2Freact-native-mr-pullrefresh/lists"}