Last active
August 17, 2017 22:00
-
-
Save coryhouse/38ad22e40a1768ee8da9 to your computer and use it in GitHub Desktop.
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
import React from 'react'; | |
const HelloWorld = (props) => { | |
const sayHi = (event) => { | |
alert(`Hi ${props.name}`); | |
}; | |
return ( | |
<div> | |
<a href="#" onClick={sayHi}>Say Hi</a> | |
</div> | |
); | |
}; | |
HelloWorld.propTypes = { | |
name: React.PropTypes.string.isRequired | |
}; | |
export default HelloWorld; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment