Skip to content

Instantly share code, notes, and snippets.

View write2lloyd's full-sized avatar

Lloyd write2lloyd

View GitHub Profile
const data = [
{
id: 1,
truckName: 'van',
truckType: 'truck',
length: 220,
width: 140,
height: 150,
truckWeight: 1000,
iconName: 'van.png',
@write2lloyd
write2lloyd / LoginButton.js
Created November 22, 2017 06:48
ReactNative Pass data from components
export default class LoginButton extends Component {
changeText = () => {
this.props.buttonClicked(this.props.title);
}
render() {
return (
<View style={styles.container}>
<TouchableOpacity onPress={this.changeText}>
<Text style = {styles.text}>
{this.props.title}