Last active
May 5, 2017 11:01
-
-
Save EmmanuelGuther/c52020953825933141139a96b0b006dc to your computer and use it in GitHub Desktop.
REACT-NATIVE: ListView to the new FlatView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Text } from 'react-native' | |
import FlatList from 'react-native/Libraries/Lists/FlatList' | |
import dataList from './dataList' | |
export default class ListViewToFlatList extends React.Component { | |
renderItem ({ item, index }) { | |
return <Text>{item}</Text> | |
} | |
render () { | |
return ( | |
<FlatList | |
data={listData} | |
renderItem={this.renderItem} | |
/> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment