Skip to content

Instantly share code, notes, and snippets.

@thebuilder
Created March 31, 2016 08:11
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 thebuilder/409526780f39849e6b5f132dde384652 to your computer and use it in GitHub Desktop.
Save thebuilder/409526780f39849e6b5f132dde384652 to your computer and use it in GitHub Desktop.
Stateless Button with basic onClick event
import React from 'react';
function handleClick(event) {
alert('click ' + event);
}
function Button({label}) {
return (
<button onClick={handleClick}>{label}</button>
);
}
export default Button;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment