I am using ListView to show the list of items. So far I have displayed same kind of items, so no issues. Now I have to show different kind of items. How can I render different kind of row, like for row 2, render this component, for row 5 render that component...
By default to show 1 Custom view for row, I use the following code:
<ListView
stickySectionHeadersEnabled={false}
scrollEnabled={!this.state.shouldAnimate}
style={styles.listView}
enableEmptySections={true}
dataSource={this.state.dataSource}
renderSectionHeader = {this.renderSectionHeader}
renderRow={(data) => <CellProgram data={data} onPress={this.GetSectionListItem.bind(this, data)} />}
/>
This will render CellProgram for all rows. What should I change to display it for particular rows and different layout for other rows?