Created
December 28, 2016 07:04
-
-
Save nayunhwan/3ff717431effb78a35d46a01519d5dd4 to your computer and use it in GitHub Desktop.
React Composing Component Example
This file contains 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
function Welcome(props) { | |
return <h1>Hello, {props.name}</h1>; | |
} | |
function App() { | |
return ( | |
<div> | |
<Welcome name="Sara" /> | |
<Welcome name="Cahal" /> | |
<Welcome name="Edite" /> | |
</div> | |
); | |
} | |
ReactDOM.render( | |
<App />, | |
document.getElementById('root') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment