Skip to content

Instantly share code, notes, and snippets.

@seanbehan
Created March 20, 2019 23:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanbehan/caf64b78f4cb389f49456fce4c9356ed to your computer and use it in GitHub Desktop.
Save seanbehan/caf64b78f4cb389f49456fce4c9356ed to your computer and use it in GitHub Desktop.
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