From 7c3e6dc55c41510c36ef4acc42e4166eabeea7c2 Mon Sep 17 00:00:00 2001 From: Aroyan <43630681+aroyan@users.noreply.github.com> Date: Sat, 6 Aug 2022 19:12:54 +0800 Subject: [PATCH] fix: update immutable js broken link (#4878) --- content/docs/reference-react.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/reference-react.md b/content/docs/reference-react.md index 8c2b032f..5affd4dd 100644 --- a/content/docs/reference-react.md +++ b/content/docs/reference-react.md @@ -123,7 +123,7 @@ If your React component's `render()` function renders the same result given the > 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. +> `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://immutable-js.com/) 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".