all repos — h3 @ 9f72a6511e88ebaaa0c5ba1a5d04baff0d788990

A tiny, extremely minimalist JavaScript microframework.

Minor changes.
h3rald h3rald@h3rald.com
Tue, 14 Apr 2020 21:15:56 +0200
commit

9f72a6511e88ebaaa0c5ba1a5d04baff0d788990

parent

ced263865b80120374e3754624bbb0ad152c996e

2 files changed, 2 insertions(+), 2 deletions(-)

jump to
M example/assets/js/components/addTodoForm.jsexample/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.jsexample/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 };