diff --git a/high-performance-react.org b/high-performance-react.org index b9f7995..286a5b1 100644 --- a/high-performance-react.org +++ b/high-performance-react.org @@ -179,7 +179,7 @@ children. | props | 'class', 'type', 'disabled' | | children |

, , Hello | -#+BEGIN_SRC :number-lines nil +#+BEGIN_SRC tag name: 'div' tag prop: 'class' children: h1..., 'Hello', input... @@ -234,6 +234,9 @@ arrays, it inserts calls to React.createElement on children, and spreads the children instead of containing them in an array. Here is what "real" JSX compiler output looks like: +# #+NAME: foo +# #+CAPTION: foo bar +# #+attr_leanpub: :line-numbers true #+BEGIN_SRC javascript React.createElement( 'div', @@ -574,7 +577,6 @@ 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. -#+CAPTION: Setting DOM Props #+BEGIN_SRC javascript function setDOMProps(element, domElement, prevElement) { if (prevElement) { diff --git a/manuscript/fundamentals--building-our-own-react.markua b/manuscript/fundamentals--building-our-own-react.markua index 722341e..5db8ea9 100644 --- a/manuscript/fundamentals--building-our-own-react.markua +++ b/manuscript/fundamentals--building-our-own-react.markua @@ -44,7 +44,6 @@ I see three parts: the name of the tag, the tag's properties, and its children. | props | 'class', 'type', 'disabled' | | children |

, , Hello | -{format: ":number-lines"} ``` tag name: 'div' tag prop: 'class' @@ -312,7 +311,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. -{format: "javascript", caption: "Setting DOM Props"} +{format: "javascript"} ``` function setDOMProps(element, domElement, prevElement) { if (prevElement) { diff --git a/manuscript/resources/images/title_page.png b/manuscript/resources/images/title_page.png new file mode 100644 index 0000000..826af11 Binary files /dev/null and b/manuscript/resources/images/title_page.png differ