From c22e4202d3fa81ccf85d1eae979a7207235d3492 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 29 Sep 2017 18:37:35 +0100 Subject: [PATCH] Fix note formatting (#10966) --- docs/docs/reference-react.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/reference-react.md b/docs/docs/reference-react.md index 9f99788d06..3e5b980d6f 100644 --- a/docs/docs/reference-react.md +++ b/docs/docs/reference-react.md @@ -71,7 +71,7 @@ See the [React.Component API Reference](/docs/react-component.html) for a list o If your React component's `render()` function renders the same result given the same props and state, you can use `React.PureComponent` for a performance boost in some cases. > Note - +> > `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()`](/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. > > Furthermore, `React.PureComponent`'s `shouldComponentUpdate()` skips prop updates for the whole component subtree. Make sure all the children components are also "pure".