Skip to content

Commit 64a776f

Browse files
committed
fix(reference/react): translate console output example in StrictMode
1 parent 4f67b77 commit 64a776f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/content/reference/react/StrictMode.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,11 +1230,11 @@ li {
12301230
12311231
```
12321232
...
1233-
Adding animal to the map. Total animals: 10
1233+
将猫添加到 map 中。当前猫的总数:10
12341234
...
1235-
Removing animal from the map. Total animals: 0
1235+
将猫从 map 中移除。当前猫的总数:0
12361236
...
1237-
Adding animal to the map. Total animals: 10
1237+
将猫添加到 map 中。当前猫的总数:10
12381238
```
12391239
12401240
**这是符合预期的。** 严格模式确认了 ref 回调被正确清理,因此数量永远不会超过预期值。修复之后,不存在内存泄漏,所有功能都按预期工作。

0 commit comments

Comments
 (0)