Created
March 20, 2019 23:50
-
-
Save seanbehan/caf64b78f4cb389f49456fce4c9356ed 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
function Hello(props){ | |
let msg | |
if(props.name==="World"){ | |
msg = <b>Hello Earth</b> | |
} else { | |
msg = <i>{props.name}</i> | |
} | |
return ( | |
<div> | |
Greeting: {msg} | |
</div> | |
) | |
} | |
ReactDOM.render( | |
<Hello name="Pluto" />, | |
document.getElementById('container') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment