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
render() { | |
return ( | |
<View style={styles.container}> | |
<Text>{this.props.leftText}</Text> | |
<Text style={styles.textStyle}>{this.props.title}</Text> | |
<Text>{this.props.rightText}</Text> | |
</View> | |
); | |
} |
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 { View } from 'react-native'; | |
const Card = (props) => ( | |
<View style={styles.containerStyle}> | |
{props.children} | |
</View> | |
); | |
const styles = { |
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
onEmailChange(text) { | |
this.emailAddress = text; | |
} | |
<Input | |
label="Email" | |
placeholder="[email protected]" | |
onChangeText={this.onEmailChange.bind(this)} | |
/> |
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
renderLogin() { | |
if(this.state.loginVisible){ | |
return ( | |
<Login | |
visible={this.state.loginVisible} | |
titleBarApi={this.setTitleBar.bind(this)} | |
goToMemberList={this.goToMemberList.bind(this)} | |
/> | |
); | |
} |
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
// constructor | |
constructor() { | |
super(); | |
this.employees = [ | |
{'name': 'Himel'}, | |
{'name': 'Rana'}, | |
{'name': 'Shuvro'}, | |
{'name': 'Proshad'} | |
]; | |
} |
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
class App extends Component { | |
render() { | |
return ( | |
<div> | |
<SearchBar onSearchTermChange={term => this.onSearchTermChange(term)}/> | |
</div> | |
); | |
} | |
onSearchTermChange(term){ |
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
// defining state | |
state = { | |
videos: [], | |
selectedVideo: null | |
}; | |
// fetch video at startup | |
componentDidMount() { | |
this.searchNewVideos('Caspian Report') | |
} |
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
// step one | |
const VideoList = (props) => { | |
const videos = props.videos; | |
return ( | |
<ul className="col-md-4 list-group"> | |
{videos.length} | |
</ul> | |
); | |
}; |
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
// step one | |
const VideoListItem = ({video}) => { | |
console.log(video); | |
return ( | |
<li className="list-group-item"> | |
<div className="video-list media"> | |
<div className="media-left"> | |
<img className="media-object" /> | |
</div> | |
<div className="media-body"> |
OlderNewer