项目作者: bhavik66

项目描述 :
Simple & Easy to use react native Grid
高级语言: JavaScript
项目地址: git://github.com/bhavik66/react-native-simple-grid.git
创建时间: 2018-04-19T03:58:50Z
项目社区:https://github.com/bhavik66/react-native-simple-grid

开源协议:MIT License

下载


react-native-simple-grid

Easy to use and full customized grid for React Native.

Installation

$ npm install react-native-simple-grid --save

Usage

  1. import Grid from 'react-native-simple-grid';
  2. <Grid
  3. dataSource={data}
  4. column={2}
  5. rowView={(rowData) => {
  6. return (
  7. <View style={{flex: 1, backgroundColor: rowData.color}}>
  8. <Text>{rowData.name}</Text>
  9. </View>
  10. )
  11. }}
  12. />

Properties

Prop Description
dataSource For simplicity, dataSource is just a plain array.
column Number of column in grid.
rowView Takes an item from data and renders it into the list.
row Number of row show in screen at a time.

other properties are derived from ListView

Example

Wallpaper World

react-native-simlpe-grid