title: How to implement ListView in ReactNative with custom cell component?
body: <p>I am building a ReactNative + Redux app and am using the <code>ListView</code> component.</p>
  
  <p>In <code>_renderRow()</code> of the <code>ListView</code>, I'd like to return my own cell component (called <code>JobDetailCell</code> that only receives the data in its <code>props</code> from the component that is managing the <code>ListView</code> (called <code>JobsRootComponent</code>).</p>
  
  <p>I came up with the following code so far:</p>
  
  <h3>JobsRootComponent.js</h3>
  
  <pre><code>import React, {
    Component,
    StyleSheet,
    Text,
    View,
    ListView,
    ActivityIndicatorIOS,
    NavigatorIOS,
    TouchableHighlight
  } from 'react-native'
  
  import { connect } from 'react-redux'
  import { bindActionCreators } from 'redux'
  import { fetchJobs } from '../actions/Actions'
  import { JobDetailCell } from './JobDetailCell'
  import { JobDetailComponent } from './JobDetailComponent'
  
  class JobsRootComponent extends Component {
  
    ...
  
    _renderRow(rowData) {
        const title = rowData.title
        const subtitle = rowData.by
        return (
          &lt;JobDetailCell title={title} subtitle={subtitle}&gt;&lt;/JobDetailCell&gt;
        )
    }
  
    ...
  
    render() {
      return (
          &lt;ListView
            style={styles.container}
            dataSource={this.props.dataSource}
            renderRow={this._renderRow}
          /&gt;
        )
    }
  
    ...
  
  }
  </code></pre>
  
  <h3>JobDetailCell.js</h3>
  
  <pre><code>import React, {
    Component,
    StyleSheet,
    Text,
    View,
  } from 'react-native'
  
  export default class JobDetailCell extends Component {
  
    render() {
      return (
        &lt;View style={styles.cellContainer}&gt;
          &lt;Text style={styles.cellTitle}&gt;{this.props.title}&lt;/Text&gt;
          &lt;Text style={styles.cellSubtitle}&gt;{this.props.subtitle}&lt;/Text&gt;
        &lt;/View&gt;
      )
    }
  
  }
  </code></pre>
  
  <p>However, when I am running the app, I get the following errors in the chrome dev console:</p>
  
  <blockquote>
    <p><strong>ExceptionsManager.js:76 Warning:</strong></p>
    
    <p><code>React.createElement</code>: type should not
    be <code>null</code>, <code>undefined</code>, <code>boolean</code>, or <code>number</code>. It should be a <code>string</code> (for DOM
    elements) or a <code>ReactClass</code> (for composite components). Check the <code>render</code>
    method of <code>StaticRenderer</code>.</p>
  </blockquote>
  
  <p>Can someone tell me what I am doing wrong here?</p>