Last active
October 30, 2015 19:39
-
-
Save julianduque/36918db24e23ad42b508 to your computer and use it in GitHub Desktop.
This file contains hidden or 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, { Component } from 'react' | |
export default class Profile extends Component { | |
constructor() { | |
super() | |
this.handleClick = (e) => { | |
console.log(this.props) | |
} | |
} | |
render () { | |
return ( | |
<div className="profile"> | |
<h2>{this.props.name}</h2> | |
<img src={this.props.avatar} /> | |
<p onClick={this.handleClick}>{this.props.children}</p> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment