Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 494 Bytes

ListView.md

File metadata and controls

29 lines (23 loc) · 494 Bytes

ListView

Display a dynamic, scrollable, list of data items.

Usage

import React, {Component} from 'react';
import {ListView, Text} from 'reactors';

export default class MyComponent extends Component {
  render() {
    const data = [
      {title: 'Foo'},
      {title: 'Bar'},
    ];

    return <ListView
      dataSource={data}
      renderRow={this.renderRow}
      />;
  }

  renderRow = (row, section_id, row_id) => {
    return <Text>{row.title}</Text>;
  };
}