{"id":15454616,"url":"https://github.com/usmansbk/sectionlist-get-item-layout","last_synced_at":"2025-04-21T05:55:18.536Z","repository":{"id":65493690,"uuid":"189935360","full_name":"usmansbk/sectionlist-get-item-layout","owner":"usmansbk","description":"React-Native SectionList getItemLayout helper","archived":false,"fork":false,"pushed_at":"2019-10-13T10:07:31.000Z","size":86,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T00:45:06.830Z","etag":null,"topics":["react-native","sectionlist"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/sectionlist-get-itemlayout","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/usmansbk.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":"2019-06-03T04:41:00.000Z","updated_at":"2024-12-13T02:36:17.000Z","dependencies_parsed_at":"2023-01-25T21:15:17.815Z","dependency_job_id":null,"html_url":"https://github.com/usmansbk/sectionlist-get-item-layout","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/usmansbk%2Fsectionlist-get-item-layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmansbk%2Fsectionlist-get-item-layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmansbk%2Fsectionlist-get-item-layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmansbk%2Fsectionlist-get-item-layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usmansbk","download_url":"https://codeload.github.com/usmansbk/sectionlist-get-item-layout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249834750,"owners_count":21331987,"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":["react-native","sectionlist"],"created_at":"2024-10-01T22:04:29.648Z","updated_at":"2025-04-20T00:45:10.828Z","avatar_url":"https://github.com/usmansbk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native SectionList getItemLayout\n\nThis package provides a function that helps you construct the `getItemLayout` function for your `SectionList`s. It's interface is based on [react-native-section-list-get-item-layout](https://medium.com/@jsoendermann/sectionlist-and-getitemlayout-2293b0b916fb). It's meant to be used like this:\n\n```javascript\nimport sectionListGetItemLayout from 'sectionlist-get-item-layout';\n\nclass MyComponent extends React.Component {\n\n  _getItemLayout = sectionListGetItemLayout({\n      // The height of the row with rowData at the given sectionIndex and rowIndex\n      getItemHeight: (rowData, sectionIndex, rowIndex) =\u003e sectionIndex === 0 ? 100 : 50,\n\n      // These five properties are optional\n      getSeparatorHeight: () =\u003e 1, // The height of your separators between items\n      getSectionHeaderHeight: () =\u003e 20, // The height of your section headers\n      getSectionFooterHeight: () =\u003e 10, // The height of your section footers\n      listHeaderHeight: 40, // The height of your header\n      listFooterHeight: 20, // The height of your footer\n    });\n\n  render() {\n    return (\n      \u003cSectionList\n        {...otherStuff}\n        getItemLayout={this._getItemLayout}\n      /\u003e\n    )\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusmansbk%2Fsectionlist-get-item-layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusmansbk%2Fsectionlist-get-item-layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusmansbk%2Fsectionlist-get-item-layout/lists"}