Skip to content

Instantly share code, notes, and snippets.

@fakiolinho
Last active March 13, 2018 18:52
Show Gist options
  • Save fakiolinho/4344d5bf02763c34683fb42e79951e40 to your computer and use it in GitHub Desktop.
Save fakiolinho/4344d5bf02763c34683fb42e79951e40 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
export default class Options extends Component {
handleAdd = () => {
console.log('add');
};
handleEdit = () => {
console.log('edit');
};
handleDelete = () => {
console.log('delete');
};
render() {
return (
<ul>
<li>
<button onClick={this.handleAdd} data-test="add">Add</button>
</li>
<li>
<button onClick={this.handleEdit} data-test="edit">Edit</button>
</li>
<li>
<button onClick={this.handleDelete} data-test="delete">Delete</button>
</li>
</ul>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment