Skip to content

Instantly share code, notes, and snippets.

@sirtimbly
Created November 29, 2017 16:06
Show Gist options
  • Save sirtimbly/e75fbfd1cd722b711ea34f570ecc0892 to your computer and use it in GitHub Desktop.
Save sirtimbly/e75fbfd1cd722b711ea34f570ecc0892 to your computer and use it in GitHub Desktop.
sam-snippet-1.ts
TodoList: (props: TodoListProps) => {
return h("ul.all-todos", props.list.map((item: string) => {
return h("input.todo", {
type: "checkbox",
value: item.id,
checked: item.done,
classes: { 'strikethrough': item.done },
onchange: this.actions.changeTodoItem,
});
}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment