Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Really good understanding of the rendering #39

Open
jackbridger opened this issue Jul 12, 2019 · 0 comments
Open

Really good understanding of the rendering #39

jackbridger opened this issue Jul 12, 2019 · 0 comments

Comments

@jackbridger
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant