|
@ -70,10 +70,12 @@ When an element’s `type` is a string, it represents a DOM node with that tag n |
|
|
className: 'button button-blue', |
|
|
className: 'button button-blue', |
|
|
children: { |
|
|
children: { |
|
|
type: 'b', |
|
|
type: 'b', |
|
|
|
|
|
props: { |
|
|
children: 'OK!' |
|
|
children: 'OK!' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
This element is just a way to represent the following HTML as a plain object: |
|
|
This element is just a way to represent the following HTML as a plain object: |
|
@ -191,10 +193,12 @@ React will ask `Button` what it renders to. The `Button` will return this elemen |
|
|
className: 'button button-blue', |
|
|
className: 'button button-blue', |
|
|
children: { |
|
|
children: { |
|
|
type: 'b', |
|
|
type: 'b', |
|
|
|
|
|
props: { |
|
|
children: 'OK!' |
|
|
children: 'OK!' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
React will repeat this process until it knows the underlying DOM tag elements for every component on the page. |
|
|
React will repeat this process until it knows the underlying DOM tag elements for every component on the page. |
|
|