Updating manuscript.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user