From 1d4cbb439f9836f0443d6aecf63c61488620a8df Mon Sep 17 00:00:00 2001 From: Jason Bonta Date: Wed, 7 Jan 2015 10:46:50 -0800 Subject: [PATCH] suggesting the use of immutable js for comparisons --- docs/10.7-pure-render-mixin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/10.7-pure-render-mixin.md b/docs/10.7-pure-render-mixin.md index 06620fa6..ee82f5e0 100644 --- a/docs/10.7-pure-render-mixin.md +++ b/docs/10.7-pure-render-mixin.md @@ -25,6 +25,6 @@ Under the hood, the mixin implements [shouldComponentUpdate](/react/docs/compone > Note: > -> This 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()` when you know deep data structures have changed. +> This 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()` when you know deep data structures have changed. Or, consider using [immutable objects](http://facebook.github.io/immutable-js/) to facilitate fast comparisons of nested data. > > Furthermore, `shouldComponentUpdate` skips updates for the whole component subtree. Make sure all the children components are also "pure".