Fix the typo in the documentaion pages for shallowCompare (#6980)
* fix the typo for the docs of shallowCompare at: https://facebook.github.io/react/docs/shallow-compare.html * change "value" to "values" to match the two objects.
Yusong Liu committed
Jun 8, 2016 at 14:09 UTC
5331323cd2a689758d6cfea01d59f927b41fde50
1 file changed
+1
-1
docs/docs/10.10-shallow-compare.md
+1
-1
@@ -26,7 +26,7 @@ export class SampleComponent extends React.Component {
26
```
27
28
`shallowCompare` performs a shallow equality check on the current `props` and `nextProps` objects as well as the current `state` and `nextState` objects.
29
-It does this by iterating on the keys of the objects being compared and returning false when the value of a key in each object are not strictly equal.
29
+It does this by iterating on the keys of the objects being compared and returning true when the values of a key in each object are not strictly equal.
30
31
`shallowCompare` returns `true` if the shallow comparison for props or state fails and therefore the component should update.
32
`shallowCompare` returns `false` if the shallow comparison for props and state both pass and therefore the component does not need to update.