Skip to content

Commit a47490c

Browse files
committed
Clarify child element rendering behaviour
1 parent 04a1bd4 commit a47490c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/content/learn/understanding-your-ui-as-a-tree.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ When a component creates a child element directly in its own JSX , it creates a
137137

138138
In the above example , `App` creates the `Copyright` and passes it to `InspirationGenerator` through `children`. If `InspirationGenerator` updates its own state without `App` rendering again , React can reuse the same `Copyright` element without rendering the `Copyright` again.
139139

140-
By contrast , if `App` creates <FancyText/> directly in its JSX , rendering `App` again creates a new element , React may render `FancyText` again as part of the render.
140+
By contrast , when a parent componenet creates a child element directly in its JSX , rendering the parent again creates a new element , and React may render that child again as part of the render.
141141

142142
Passing children through props doesn't prevent all re-renders. A child can still render when its own state or context changes , or when its parent renders and creates a new element.
143143

0 commit comments

Comments
 (0)