{"id":13422569,"url":"https://github.com/ggordan/react-infinite-grid","last_synced_at":"2025-03-15T12:30:44.809Z","repository":{"id":26021428,"uuid":"29464230","full_name":"ggordan/react-infinite-grid","owner":"ggordan","description":"A React component which renders a grid of elements.","archived":false,"fork":false,"pushed_at":"2020-07-15T19:42:42.000Z","size":857,"stargazers_count":202,"open_issues_count":10,"forks_count":39,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-02-28T12:30:03.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ggordan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-19T09:51:07.000Z","updated_at":"2024-10-02T20:12:21.000Z","dependencies_parsed_at":"2022-08-24T20:42:33.922Z","dependency_job_id":null,"html_url":"https://github.com/ggordan/react-infinite-grid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggordan%2Freact-infinite-grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggordan%2Freact-infinite-grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggordan%2Freact-infinite-grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggordan%2Freact-infinite-grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggordan","download_url":"https://codeload.github.com/ggordan/react-infinite-grid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243730975,"owners_count":20338747,"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":[],"created_at":"2024-07-30T23:00:47.970Z","updated_at":"2025-03-15T12:30:44.490Z","avatar_url":"https://github.com/ggordan.png","language":"JavaScript","funding_links":[],"categories":["Performance","Uncategorized"],"sub_categories":["UI","Uncategorized"],"readme":"# react-infinite-grid\n\n_react infinite grid_ is a React component which renders a grid of React elements. It's different because it only renders the elements that the user can see (and a small buffer) meaning that it is well suited for displaying a large number of elements.\n\n# Installation\n\n```\nnpm install react-infinite-grid\n```\n\n# Example\n\nThe example below renders a grid with 100,000 items.\n\n```jsx\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport InfiniteGrid from '../src/grid';\n\nclass ExampleItem extends React.Component {\n\n  static get propTypes() {\n    return {\n      index: React.PropTypes.number\n    };\n  }\n\n  render() {\n    return(\n      \u003cdiv className='example'\u003e\n        This is {this.props.index}\n      \u003c/div\u003e\n    );\n  }\n\n}\n\n// Create 100,000 Example items\nlet items = [];\nfor (let i = 0; i \u003c= 100000; i++) {\n  items.push(\u003cExampleItem index={i} /\u003e);\n}\n\nReactDOM.render(\u003cInfiniteGrid itemClassName={\"item\"} entries={items} /\u003e, document.getElementById('grid'));\n```\n\n## Required props\n\n- **entries** `React.PropTypes.arrayOf(React.PropTypes.element)` - The only required property is an array of React elements that you want to render.\n\n## Optional props\n\n- **height** `React.PropTypes.number` - The height of the grid item\n- **width** `React.PropTypes.number` - The width of the grid item\n- **padding** `React.PropTypes.number` - The padding around your items\n- **wrapperHeight** `React.PropTypes.number` - The height of the grid.\n- **lazyCallback** `React.PropTypes.func` - A function that takes no arguments which is called when a user reaches the end of the grid. Useful if you want to lazy load your data.\n\n# Demo\n\nYou can find a demo [here](http://ggordan.com/post/react-infinite-grid.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggordan%2Freact-infinite-grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggordan%2Freact-infinite-grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggordan%2Freact-infinite-grid/lists"}