Files
frontend-bootcamp/step1-06/final/src/components/TodoListItem.tsx
Elizabeth Craig 9007b137ca More day 1 updates
2019-02-28 00:05:25 -08:00

16 lines
423 B
TypeScript

import React from 'react';
export class TodoListItem extends React.Component<any, any> {
render() {
const { label, completed } = this.props;
// The "no-op" onChange handler prevents a console warning from React at runtime
return (
<li className="todo">
<label>
<input type="checkbox" checked={completed} onChange={() => undefined} /> {label}
</label>
</li>
);
}
}