{"id":21198394,"url":"https://github.com/netyouli/react-native-whc-grid","last_synced_at":"2025-07-10T05:32:54.862Z","repository":{"id":57341519,"uuid":"125006575","full_name":"netyouli/react-native-whc-grid","owner":"netyouli","description":"A react native module to show grid view, it works on iOS and Android","archived":false,"fork":false,"pushed_at":"2018-03-13T07:15:52.000Z","size":1089,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-30T22:55:55.870Z","etag":null,"topics":["grid","react","react-native","react-native-whc-grid","whc"],"latest_commit_sha":null,"homepage":"https://github.com/netyouli/react-native-whcapp","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/netyouli.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":"2018-03-13T06:59:24.000Z","updated_at":"2021-04-03T08:24:14.000Z","dependencies_parsed_at":"2022-09-10T14:11:43.181Z","dependency_job_id":null,"html_url":"https://github.com/netyouli/react-native-whc-grid","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netyouli%2Freact-native-whc-grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netyouli%2Freact-native-whc-grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netyouli%2Freact-native-whc-grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netyouli%2Freact-native-whc-grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netyouli","download_url":"https://codeload.github.com/netyouli/react-native-whc-grid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225622929,"owners_count":17498168,"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":["grid","react","react-native","react-native-whc-grid","whc"],"created_at":"2024-11-20T19:51:04.551Z","updated_at":"2024-11-20T19:51:05.161Z","avatar_url":"https://github.com/netyouli.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-whc-grid\nA react native module to show grid view, it works on iOS and Android.\n\n[ ![release](https://img.shields.io/github/release/netyouli/react-native-whc-grid.svg?maxAge=2592000?style=flat-square)](https://github.com/netyouli/react-native-whc-grid/releases)\n[ ![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen.svg)](https://github.com/netyouli/react-native-whc-grid/pulls)\n[ ![NPM version](http://img.shields.io/npm/v/react-native-whc-grid.svg?style=flat)](https://www.npmjs.com/package/react-native-whc-grid)\n[![License MIT](http://img.shields.io/badge/license-MIT-orange.svg?style=flat)](https://raw.githubusercontent.com/crazycodeboy/react-native-whc-grid/master/LICENSE)\n[ ![语言 中文](https://img.shields.io/badge/语言-中文-yellow.svg)](https://github.com/netyouli/react-native-whc-grid/blob/master/README.zh.md)\n\n\n\n## Content\n\n- [Installation](#installation)\n- [Demo](#demo)\n- [Getting started](#getting-started)\n- [API](#api)\n- [Contribution](#contribution)\n\n## Installation\n\n* 1.Run `npm install react-native-whc-grid --save`\n* 2.`import Grid from 'react-native-whc-grid'`\n\n## Demo  \n* [Example](https://github.com/netyouli/react-native-whc-grid/tree/master/example)\n\n\u003cimg src = \"https://github.com/netyouli/react-native-whc-grid/blob/master/example/screenshots/react-native-whc-gird.jpg\" width = \"375\"\u003e\n\n## Getting started  \n\nAdd `react-native-whc-grid` to your js file.\n\n`import Grid from 'react-native-whc-grid'`\n\nInside your component's render method, use Grid:\n\n```jsx\n render() {\n         return (\n             \u003cView style={styles.container}\u003e\n                 ...\n                 \u003cGrid\n                    style = {styles.grid}\n                    column = {4}\n                    data = {this.girdItems}\n                    renderItem = {(item, index) =\u003e (\n                        \u003cHomeGridItem\n                            key = {index}\n                            item = {item}\n                            onPress={() =\u003e {}}\n                        /\u003e\n                    )}\n                 /\u003e\n             \u003c/View\u003e\n         );\n }\n\n```\n\n### Basic usage\n\n```jsx\nrender() {\n        return (\n            \u003cView style={styles.container}\u003e\n                \u003cGrid\n                   style = {styles.grid}\n                   column = {4}\n                   data = {this.girdItems}\n                   rowSeparatorLineRender = {(index) =\u003e (\u003cLine key = {index} /\u003e)}\n                   columnSeparatorLineRender = {(index) =\u003e (\n                        \u003cLine key = {index} style = {styles.columnline}/\u003e\n                   )}\n                   renderItem = {(item, index) =\u003e (\n                       \u003cHomeGridItem\n                           key = {index}\n                           item = {item}\n                           onPress={() =\u003e {}}\n                       /\u003e\n                   )}\n                /\u003e\n            \u003c/View\u003e\n        );\n    }\n```\n\nThen you can use it like this:\n\u003e1.grid item reload：\n\n```jsx\n this.refs.grid.reloadData(datas);\n```\n\n## API\n\nProps              | Type     | Optional | Default     | Description\n----------------- | -------- | -------- | ----------- | -----------\nstyle |  ViewPropTypes.style |true | {}  | Custom default grid style\ncolumn  | PropTypes.number  | true | 0  |   Set grid column count\nrenderItem  | PropTypes.func  | true | null  |   Render gird item\nrowSeparatorLineRender  | PropTypes.func  | true | null  |   Render grid row separator line\ncolumnSeparatorLineRender  | PropTypes.func  | true | null  |   Render grid column separator line\n\n\n\nMethod   |  Type     | Optional | Description\n----------------- | -------- | -------- | -----------\nreloadData(datas)   | function | true | reload grid item render\n\n\n## Contribution\n\nIssues are welcome. Please add a screenshot of bug and code snippet. Quickest way to solve issue is to reproduce it on one of the examples.\n\nPull requests are welcome. If you want to change API or making something big better to create issue and discuss it first.\n\n---\n\n**MIT Licensed**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetyouli%2Freact-native-whc-grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetyouli%2Freact-native-whc-grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetyouli%2Freact-native-whc-grid/lists"}