Skip to content

Commit c4e3811

Browse files
authored
docs(part1d): Fix minor grammatical issue in "Do Not Define Components Within Components"
Changed "The biggest problems are" to "One of the biggest issues is"
1 parent 3d54771 commit c4e3811

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/1/en/part1d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ const App = () => {
10841084
}
10851085
```
10861086

1087-
The application still appears to work, but **don't implement components like this!** Never define components inside of other components. The method provides no benefits and leads to many unpleasant problems. The biggest problems are because React treats a component defined inside of another component as a new component in every render. This makes it impossible for React to optimize the component.
1087+
The application still appears to work, but **do not implement components like this!** Never define components inside of other components. The method provides no benefits and only leads to problems. One such problem is that React will treat a component defined inside of another component as a "new component" in every render. This makes it impossible for React to optimize the component.
10881088

10891089
Let's instead move the <i>Display</i> component function to its correct place, which is outside of the <i>App</i> component function:
10901090

0 commit comments

Comments
 (0)