Skip to content

Commit ec80907

Browse files
mdimamhosenCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent d3a283c commit ec80907

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/content/learn/preserving-and-resetting-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ label {
478478

479479
You might expect the state to reset when you tick checkbox, but it doesn't! This is because **both of these `<Counter />` tags are rendered at the same position.** React doesn't know where you place the conditions in your function. All it "sees" is the tree you return.
480480

481-
In both cases, the `App` component returns a `<div>` with `<Counter />` as a first child. To React, these two counters have the same "address": they're both the first child of the `<div>` that `App` returns. This is how React matches them up between the previous and next renders, regardless of how you structure your logic.
481+
In both cases, the `App` component returns a `<div>` with `<Counter />` as the first child. To React, these two counters have the same "address": they're both the first child of the `<div>` that `App` returns. This is how React matches them up between the previous and next renders, regardless of how you structure your logic.
482482

483483
</Pitfall>
484484

0 commit comments

Comments
 (0)