Updating manuscript.

master
Thomas Hintz 4 years ago
parent fc6837c47c
commit 294a783337

@ -307,9 +307,7 @@ function createDOMElement(element) {
To set the props on an element we first clear all the existing props and then loop through the current props, setting them accordingly. Of course we filter out the `children` prop since we use that elsewhere and it isn't intended to be set directly.
#+NAME Setting DOM Props
{format: "javascript"}
{format: "javascript", id: "Setting DOM Props"}
```
function setDOMProps(element, domElement, prevElement) {
if (prevElement) {
@ -327,7 +325,7 @@ function setDOMProps(element, domElement, prevElement) {
}
```
> React is more intelligent about only updating or removing props that need to be.
I> React is more intelligent about only updating or removing props that need to be.
W> This algorithm for setting props does not correctly handle events which must be treated specially. For this exercise that detail is not important though.

Loading…
Cancel
Save