You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your code is very clear and logical and reading it has helped me understand the concepts especially how you update the state using rendering. Thank you!
For instance the below:
todoNode.addEventListener("click", function(e) { var newState = todoFunctions.markTodo(state, todo.id); update(newState); });
You only update the state inside the event listener.
Then you have things like the below outside, which get updated on the DOM when you update state.
if (todo.done) { markTodoButtonNode.textContent = "✔"; todoSpan.style.textDecoration = "line-through"; }
Great job!
The text was updated successfully, but these errors were encountered:
Your code is very clear and logical and reading it has helped me understand the concepts especially how you update the state using rendering. Thank you!
For instance the below:
todoNode.addEventListener("click", function(e) { var newState = todoFunctions.markTodo(state, todo.id); update(newState); });
You only update the state inside the event listener.
Then you have things like the below outside, which get updated on the DOM when you update state.
if (todo.done) { markTodoButtonNode.textContent = "✔"; todoSpan.style.textDecoration = "line-through"; }
Great job!
The text was updated successfully, but these errors were encountered: