Skip to content

Commit 95fdab0

Browse files
author
zhaozhiming
committed
fix: fix review
1 parent a495764 commit 95fdab0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/docs/lists-and-keys.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ ReactDOM.render(
9898

9999
## Keys {#keys}
100100

101-
Keys 可以在 DOM 中的某些元素被增加或删除的时候帮助 React 识别哪些元素发生了变化。因此你应当给数组中的每一个元素赋予一个确定的标识。
101+
Keys 帮助 React 识别哪些元素改变了,比如被添加或删除。因此你应当给数组中的每一个元素赋予一个确定的标识。
102102

103103
```js{3}
104104
const numbers = [1, 2, 3, 4, 5];
@@ -119,7 +119,7 @@ const todoItems = todos.map((todo) =>
119119
);
120120
```
121121

122-
当元素没有确定的 id 时,你可以使用他的序列号索引 index 作为 key:
122+
当元素没有确定 id 的时候,万不得已你可以使用元素索引 index 作为 key:
123123

124124
```js{2,3}
125125
const todoItems = todos.map((todo, index) =>

0 commit comments

Comments
 (0)