Skip to content

Instantly share code, notes, and snippets.

@coryhouse
Last active August 17, 2017 22:00
Show Gist options
  • Save coryhouse/38ad22e40a1768ee8da9 to your computer and use it in GitHub Desktop.
Save coryhouse/38ad22e40a1768ee8da9 to your computer and use it in GitHub Desktop.
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