{"id":13702288,"url":"https://github.com/sarons/react-recycled-scrolling","last_synced_at":"2025-05-05T04:30:58.390Z","repository":{"id":35111759,"uuid":"207856586","full_name":"sarons/react-recycled-scrolling","owner":"sarons","description":"Simulate normal scrolling by using only fixed number of DOM elements for large lists of items with React Hooks","archived":false,"fork":false,"pushed_at":"2025-02-28T02:30:27.000Z","size":1895,"stargazers_count":30,"open_issues_count":19,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T17:07:39.017Z","etag":null,"topics":["list","listview","performance","react","react-component","react-hooks","recyclerview","scrolling","virtualization"],"latest_commit_sha":null,"homepage":"https://y8mlf.csb.app/","language":"JavaScript","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/sarons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-11T16:23:07.000Z","updated_at":"2024-12-03T16:01:18.000Z","dependencies_parsed_at":"2024-01-14T19:14:33.326Z","dependency_job_id":"348abbeb-008a-42dd-96e8-36f8fec3f739","html_url":"https://github.com/sarons/react-recycled-scrolling","commit_stats":{"total_commits":91,"total_committers":4,"mean_commits":22.75,"dds":"0.43956043956043955","last_synced_commit":"752d7cc186cb342aceee1d7df59d1b734287a34d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarons%2Freact-recycled-scrolling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarons%2Freact-recycled-scrolling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarons%2Freact-recycled-scrolling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarons%2Freact-recycled-scrolling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sarons","download_url":"https://codeload.github.com/sarons/react-recycled-scrolling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252439474,"owners_count":21748011,"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":["list","listview","performance","react","react-component","react-hooks","recyclerview","scrolling","virtualization"],"created_at":"2024-08-02T21:00:33.352Z","updated_at":"2025-05-05T04:30:57.904Z","avatar_url":"https://github.com/sarons.png","language":"JavaScript","funding_links":[],"categories":["UI Components"],"sub_categories":["Infinite Scroll"],"readme":"# React Recycled Scrolling\n\n![npm](https://img.shields.io/npm/v/react-recycled-scrolling)\n[![Build Status](https://travis-ci.org/sarons/react-recycled-scrolling.svg?branch=master)](https://travis-ci.org/sarons/react-recycled-scrolling)\n[![Coverage Status](https://coveralls.io/repos/github/sarons/react-recycled-scrolling/badge.svg?branch=master)](https://coveralls.io/github/sarons/react-recycled-scrolling?branch=master)\n\n\u003e Simulate normal scrolling by using only fixed number of DOM elements for large lists of items with React Hooks\n\n[npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square\n[npm]: https://www.npmjs.org/package/npm-package\n\n## Install\n\n```bash\nnpm install --save react-recycled-scrolling\n```\n\n## Usage\n\nAll that is required is \n* **attrList**: A list of items\n* **itemFn**: A React functional component or even just a function that returns jsx for each element\n\n```javascript\nconst numberList = []\nfor (let i = 1; i \u003c= 20000; i++) numberList.push(i)\nconst SheepRow = (no) =\u003e (\u003cdiv\u003e {no} Sheep \u003c/div\u003e)\n```\n\nThen just drop in your RecycledList wherever you need it\n\n```javascript\nimport RecycledList from 'react-recycled-scrolling'\n\n\u003cRecycledList\nitemFn = {SheepRow}\nattrList = {numberList}\n/\u003e\n```\n\nAdditional parameters are\n* **itemHeight**: Height of each item, Default: 50\n* **rowOffset**: How many buffer rows you need outside the viewable screen, Default: 6\n* **className**: custom CSS for the outer scroll wrapper. You must have {position: relative} for recycled scroll to work\n\n```javascript\n\u003cRecycledList\n  itemFn = {SheepRow}\n  attrList = {numberList}\n  itemHeight = {120}\n  rowOffset = {10}\n  className = {'CustomContainer'}\n/\u003e\n```\n\n## Example\n\n[![Edit jovial-haibt-y8mlf](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/jovial-haibt-y8mlf?fontsize=14)\n\nhttps://codesandbox.io/s/jovial-haibt-y8mlf?fontsize=14\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarons%2Freact-recycled-scrolling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarons%2Freact-recycled-scrolling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarons%2Freact-recycled-scrolling/lists"}