We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 55543f4 + 4e91df8 commit 9069195Copy full SHA for 9069195
Ch06/react-immutable-introduction.md
@@ -203,7 +203,7 @@ ImmutableJS 提供了 7 種不可修改的資料類型:`List`、`Map`、`Stack
203
傳統 JavaScript 比較方式,若資料型態為 Primitive 就不會有問題:
204
205
```javascript
206
-// 在 shouldComponentUpdate 比較接下來的 props 一否一致,若相同則不重新渲染,提昇效能
+// 在 shouldComponentUpdate 比較接下來的 props 是否一致,若相同則不重新渲染,提昇效能
207
shouldComponentUpdate (nextProps) {
208
return this.props.value !== nextProps.value;
209
}
@@ -213,7 +213,7 @@ shouldComponentUpdate (nextProps) {
213
214
215
// 假設 this.props.value 為 { foo: 'app' }
216
-// 架設 nextProps.value 為 { foo: 'app' },
+// 假設 nextProps.value 為 { foo: 'app' },
217
// 雖然兩者值是一樣,但由於 reference 位置不同,所以視為不同。但由於值一樣應該要避免重複渲染
218
this.props.value !== nextProps.value; // true
219
```
0 commit comments