Skip to content

Instantly share code, notes, and snippets.

@julianduque
Last active October 30, 2015 19:39
Show Gist options
  • Save julianduque/36918db24e23ad42b508 to your computer and use it in GitHub Desktop.
Save julianduque/36918db24e23ad42b508 to your computer and use it in GitHub Desktop.
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