Skip to content

Instantly share code, notes, and snippets.

@desawarna
Created August 5, 2018 10:07
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 desawarna/f1479790a5d6d596732584e6db3a1737 to your computer and use it in GitHub Desktop.
Save desawarna/f1479790a5d6d596732584e6db3a1737 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
export default class Todo extends Component {
render() {
let { id, todo, onRemove } = this.props;
return (
<li>
{todo} <button onClick={() => onRemove(id)}>x</button>
</li>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment