Minor changes.
h3rald h3rald@h3rald.com
Tue, 14 Apr 2020 21:15:56 +0200
2 files changed,
2 insertions(+),
2 deletions(-)
M
example/assets/js/components/addTodoForm.js
→
example/assets/js/components/addTodoForm.js
@@ -11,7 +11,7 @@ return;
} h3.dispatch("error/clear"); h3.dispatch("todos/add", { - key: `todo_${Date.now()}__${btoa(newTodo.value)}`, // Make todos "unique-enough" to ensure they are processed correctly + key: `todo_${Date.now()}__${btoa(newTodo.value)}`, text: newTodo.value, }); newTodo.value = "";
M
example/assets/js/modules.js
→
example/assets/js/modules.js
@@ -30,7 +30,7 @@ store.on("$init", () => ({ todos: [], filteredTodos: [], filter: "" }));
store.on("todos/add", (state, data) => { let todos = state.todos; todos.unshift({ - key: data.key, // Make todos "unique-enough" to ensure they are processed correctly + key: data.key, text: data.text, }); return { todos };