@samitouri / QOS-React-2 / commits / c3ce14a373

[Docs] Replace 'mix in' in PureComponent notes (#8730)

* [Docs] Replace 'mix in' in PureComponent notes * Style nit

Spen Taylor committed Jan 11, 2017 at 01:02 UTC c3ce14a373a5f76f1d28e06d976baecc4dade8c2
1 file changed +1 -1
docs/docs/reference-react.md
+1 -1
@@ -106,7 +106,7 @@ If your React component's `render()` function renders the same result given the
106
107 > Note
108
109 -> `React.PureComponent`'s `shouldComponentUpdate()` only shallowly compares the objects. If these contain complex data structures, it may produce false-negatives for deeper differences. Only mix into components which have simple props and state, or use [`forceUpdate()`](/react/docs/react-component.html#forceupdate) when you know deep data structures have changed. Or, consider using [immutable objects](https://facebook.github.io/immutable-js/) to facilitate fast comparisons of nested data.
109 +> `React.PureComponent`'s `shouldComponentUpdate()` only shallowly compares the objects. If these contain complex data structures, it may produce false-negatives for deeper differences. Only extend `PureComponent` when you expect to have simple props and state, or use [`forceUpdate()`](/react/docs/react-component.html#forceupdate) when you know deep data structures have changed. Or, consider using [immutable objects](https://facebook.github.io/immutable-js/) to facilitate fast comparisons of nested data.
110 >
111 > Furthermore, `React.PureComponent`'s `shouldComponentUpdate()` skips prop updates for the whole component subtree. Make sure all the children components are also "pure".
112