{"id":20510561,"url":"https://github.com/eightfeet/rmc-pull-updown-to-refresh","last_synced_at":"2026-03-02T21:02:43.613Z","repository":{"id":32734234,"uuid":"140497202","full_name":"eightfeet/rmc-pull-updown-to-refresh","owner":"eightfeet","description":"a pull to refresh component for ReactJS","archived":false,"fork":false,"pushed_at":"2023-01-07T18:51:51.000Z","size":6279,"stargazers_count":14,"open_issues_count":14,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-01T07:20:36.614Z","etag":null,"topics":["react","react-mobile","react-pull-to-refresh"],"latest_commit_sha":null,"homepage":"https://www.eightfeet.cn/rmc-pull-updown-to-refresh/index.html","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eightfeet.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":"2018-07-10T23:21:34.000Z","updated_at":"2025-02-27T05:22:15.000Z","dependencies_parsed_at":"2023-01-14T22:04:35.163Z","dependency_job_id":null,"html_url":"https://github.com/eightfeet/rmc-pull-updown-to-refresh","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/eightfeet/rmc-pull-updown-to-refresh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eightfeet%2Frmc-pull-updown-to-refresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eightfeet%2Frmc-pull-updown-to-refresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eightfeet%2Frmc-pull-updown-to-refresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eightfeet%2Frmc-pull-updown-to-refresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eightfeet","download_url":"https://codeload.github.com/eightfeet/rmc-pull-updown-to-refresh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eightfeet%2Frmc-pull-updown-to-refresh/sbom","scorecard":{"id":369912,"data":{"date":"2025-08-11","repo":{"name":"github.com/eightfeet/rmc-pull-updown-to-refresh","commit":"5ff073aa37fa0e53949c9c314e900650ef0478e6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"55 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8mmm-9v2q-x3f9","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T12:43:01.369Z","repository_id":32734234,"created_at":"2025-08-18T12:43:01.370Z","updated_at":"2025-08-18T12:43:01.370Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30020124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T20:56:45.032Z","status":"ssl_error","status_checked_at":"2026-03-02T20:51:18.182Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","react-mobile","react-pull-to-refresh"],"created_at":"2024-11-15T20:30:01.680Z","updated_at":"2026-03-02T21:02:43.591Z","avatar_url":"https://github.com/eightfeet.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rmc-pull-updown-to-refresh  \n\nAn accessible and easy component for ReactJS\n\n### 简单易用的react拖拉翻页组件 \n\n8kb大小, 灵活自由，高度可配置， 支持局部滚动。\n\n# Installing\n\nnpm  \n```sh\nnpm i rmc-pull-updown-to-refresh -S\n```\nyarn\n```sh\nyarn add rmc-pull-updown-to-refresh\n```\n\n##  [Example repo](https://github.com/eightfeet/rmc-pull-updown-to-refresh/tree/master/example)\n```ssh\ngit clone https://github.com/eightfeet/rmc-pull-updown-to-refresh.github\ncd rmc-pull-updown-to-refresh\nnpm install\nnpm run build\n\ncd example npm install\nnpm run start\n\n```\n\n```js\nimport React, { useCallback, useState } from 'react';\nimport PullToRefresh from 'rmc-pull-updown-to-refresh';\n\nfunction App() {\n    const [list, setList] = useState\u003cnumber[]\u003e([1,2,3,4,5]);\n\n    const onPullDown = useCallback(\n        () =\u003e\n            new Promise((res, rej) =\u003e {\n                setTimeout(() =\u003e {\n                    rej('暂无数据');\n                    setList([]);\n                }, 3000);\n            }),\n        []\n    );\n\n    const onPullUp = useCallback(\n        () =\u003e\n            new Promise((res, rej) =\u003e {\n                setTimeout(() =\u003e {\n                    if (list?.length \u003c 30) {\n                        setList((data) =\u003e {\n                            const newData = [...data];\n                            for (\n                                let index = list.length;\n                                index \u003c list.length + 15;\n                                index++\n                            ) {\n                                newData.push(index);\n                            }\n                            return newData;\n                        });\n                        res(null);\n                    } else {\n                        rej('别扯了!这是底线');\n                    }\n                }, 3000);\n            }),\n        [list]\n    );\n\n    return (\n        \u003cdiv className=\"App\"\u003e\n            \u003cdiv className=\"wrap\"\u003e\n                \u003cPullToRefresh\n                    className=\"list\"\n                    loadingClassName=\"background\"\n                    onPullUp={onPullUp}\n                    onPullDown={onPullDown}\n                    pullDownText={\n                        \u003cdiv className=\"pulldowntext\"\u003e下拉刷新\u003c/div\u003e\n                    }\n                    loadingText={'请稍候'}\n                \u003e\n                    {list.map((item) =\u003e (\n                        \u003cdiv className=\"item\" key={item}\u003e{item}\u003c/div\u003e\n                    ))}\n                    {list.length ? null : \u003cdiv className='none'\u003e找不到数据\u003c/div\u003e}\n                \u003c/PullToRefresh\u003e\n            \u003c/div\u003e\n        \u003c/div\u003e\n    );\n}\n\nexport default App;\n\n\n```\n\n# Api\n\n```typescript\ninterface Props {\n    disablePullDown?: boolean; // 禁止下拉\n    disablePullUp?: boolean; // 禁止上拉\n    pullDownText?: React.ReactNode; // 下拉时展示的文本\n    pullUpText?: React.ReactNode; // 上拉时展示的文本\n    onPullUp?: () =\u003e Promise\u003cany\u003e; // 上拉方法，要求返回promise，reject返回错误信息\n    onPullDown?: () =\u003e Promise\u003cany\u003e; // 下拉方法，要求返回promise，reject返回错误信息\n    className?: string; //样式\n    children: React.ReactNode; \n    loadingClassName?: string; // 加载条样式\n    loadIcon?: React.ReactNode; // 加载图标\n    loadingText?: React.ReactNode; // 加载文本\n    pullIcon?: React.ReactNode; // 拉动时方向图标\n}\n```\n\n\n# ⚠️ 注意\nrmc-pull-updown-to-refresh  根据父级高度来定义滚动视窗高度，组件初始化前请定义好父级HTML元素高度，如果获取不到父级HTML元素高度，滚动视窗高度高度将被设置为浏览器窗口高度\n\n\n# 事件流 Event flow\n\u003cimg src=\"https://www.eightfeet.cn/rmc-pull-updown-to-refresh/flow.png\" width=\"500\" /\u003e\n\n## Demo\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://www.eightfeet.cn/rmc-pull-updown-to-refresh/example.gif\" width=\"300\" /\u003e\n    \u003cbr /\u003e \n    手机扫码体验   \n    \u003cbr /\u003e   \u003cimg src=\"https://www.eightfeet.cn/rmc-pull-updown-to-refresh/demo.png\" width=\"100\" /\u003e  \n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feightfeet%2Frmc-pull-updown-to-refresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feightfeet%2Frmc-pull-updown-to-refresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feightfeet%2Frmc-pull-updown-to-refresh/lists"}