Skip to content

Commit dccecb3

Browse files
authored
Merge pull request #4186 from kevin8999/patch-2
docs(part1d): Fix minor grammatical issue in "Do Not Define Components Within Components"
2 parents 81b37c7 + c4e3811 commit dccecb3

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)