Created
March 6, 2017 10:44
-
-
Save casprwang/e2952f25d645a05f95e30b17578726a1 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
class Note extends React.Component { | |
constructor({age}) { | |
super() | |
// {age } = props.age | |
// this.age = {age} | |
this.age = {age} | |
} | |
componentDidMount(){ | |
} | |
render() { | |
return ( | |
<div> | |
<h1>{this.props.age}</h1> | |
</div> | |
) | |
} | |
} | |
ReactDOM.render( | |
<Note age={22}> | |
</Note>, | |
document.getElementById('root'), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment