Skip to content

Instantly share code, notes, and snippets.

@rrmdn
Last active January 23, 2021 12:07
Show Gist options
  • Select an option

  • Save rrmdn/6068c417fe43d6e4be17ab06f707d3c2 to your computer and use it in GitHub Desktop.

Select an option

Save rrmdn/6068c417fe43d6e4be17ab06f707d3c2 to your computer and use it in GitHub Desktop.
import qoreContext from "../qoreContext";
export default function Todo() {
const items = qoreContext.views.allTodo.useListRow();
return (
<>
<section class="todoapp">
<header class="header">
<h1>todos</h1>
<input
class="new-todo"
placeholder="What needs to be done?"
autofocus
/>
</header>
<section class="main">
<ul class="todo-list">
{(items.data || []).map((item) => (
<li key={item.id} class={item.done && "completed"}>
<div class="view">
<input class="toggle" type="checkbox" checked={item.done} />
<label>{item.name}</label>
<button class="destroy"></button>
</div>
<input class="edit" value="Create a TodoMVC template" />
</li>
))}
</ul>
</section>
</section>
</>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment