Skip to content

brianjd/react-native-grid-view

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-grid-view

This component allows to display a grid/collection of items with more than one item per row. The items per row is configurable and it uses a 'ListView' in order to have a proper recycle mechanism.

Image of react-grid-view

Getting started

  1. npm install react-native-grid-view

Example

All you need is to require the react-native-grid-view module and then use the <GridView/> tag.

var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  View
} = React;
var GridView = require('react-native-grid-view');

var myApp = React.createClass({
  render: function() {
    return (
      <GridView
        items={this.state.movies}
        itemsPerRow={3}
        renderItem={this.renderItem}
      />
    );
  },
  renderItem: function(item) {
    return <Movie movie={item} />
  },
});

AppRegistry.registerComponent('myApp', () => myApp);

About

React Native Grid/Collection View component

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%