Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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