Skip to content

Commit

Permalink
Fix docs typo: "overridden" -> "overwritten"
Browse files Browse the repository at this point in the history
I think this was meant to say "overwritten", since "the statement overwrites the data" makes more sense than "the statement overrides the data".
  • Loading branch information
dpercy committed Jun 24, 2015
1 parent 3dc4384 commit 78018b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/10.7-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ myData.x.y.z = 7;
myData.a.b.push(9);
```

you have no way of determining which data has changed since the previous copy is overridden. Instead, you need to create a new copy of `myData` and change only the parts of it that need to be changed. Then you can compare the old copy of `myData` with the new one in `shouldComponentUpdate()` using triple-equals:
you have no way of determining which data has changed since the previous copy has been overwritten. Instead, you need to create a new copy of `myData` and change only the parts of it that need to be changed. Then you can compare the old copy of `myData` with the new one in `shouldComponentUpdate()` using triple-equals:

```js
var newData = deepCopy(myData);
Expand Down

0 comments on commit 78018b9

Please sign in to comment.