Skip to content

Instantly share code, notes, and snippets.

View mariodev12's full-sized avatar

Mario mariodev12

View GitHub Profile
react-native link react-native-maps
npm install --save react-native-maps
react-native init googleMapsAirbnb
cd googleMapsAirbnb
[
{
"key":1,
"name":"Suits",
"image":"https://static.tvmaze.com/uploads/images/medium_portrait/0/2432.jpg"
},
{
"key":2,
"name":"Modern Family",
"image":"https://static.tvmaze.com/uploads/images/medium_portrait/0/628.jpg"
<TextInput
style={styles.textInput}
onChangeText={(text) => this.filterSearch(text)}
value={this.state.text}
/>
filterSearch(text){
this.setState({text})
let newData = this.dataFilter(text, this.state.rawData);
this.setState({
dataSource: this.state.dataSource.cloneWithRows(newData),
isLoaded: true,
empty: false
})
}
renderRow(rowData){
return (
<TouchableHighlight style={styles.containerCell}>
<View>
<View style={styles.footerContainer}>
<View style={styles.footerTextContainer}>
<Text style={styles.text}>{rowData.name}</Text>
<Text style={[styles.text, styles.textTitle]}>{rowData.number}</Text>
<Text style={[styles.text, styles.textBy]}>By {rowData.airdate}</Text>
</View>
<ListView
enableEmptySections={true}
renderRow={this.renderRow.bind(this)}
dataSource={this.state.dataSource}
/>