Last active
January 23, 2021 12:07
-
-
Save rrmdn/6068c417fe43d6e4be17ab06f707d3c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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