Created
November 19, 2015 09:58
-
-
Save peterlazar1993/e048becf1a03689e917d to your computer and use it in GitHub Desktop.
React HelloWorld with props ES6
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 HelloWorld extends React.Component { | |
render() { | |
return ( | |
<div> | |
Hello, World! I am {this.props.name} | |
</div> | |
); | |
} | |
}; | |
React.render(<HelloWorld name="React"/>, document.getElementById('container')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment