From 3aa1d52f96aafcdb4072b44af6bb230033464605 Mon Sep 17 00:00:00 2001 From: EugeneGarbuzov Date: Fri, 20 Jan 2017 22:25:21 +0300 Subject: [PATCH] Corrected a typo. (#8837) shoud -> should --- docs/optimizing-performance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/optimizing-performance.md b/docs/optimizing-performance.md index d5853e0a..fe1d9307 100644 --- a/docs/optimizing-performance.md +++ b/docs/optimizing-performance.md @@ -184,7 +184,7 @@ class WordAdder extends React.Component { } ``` -The problem is that `PureComponent` will do a simple comparison between the old and new values of `this.props.words`. Since this code mutates the `words` array in the `handleClick` method of `WordAdder`, the old and new values of `this.props.words` will compare as equal, even though the actual words in the array have changed. The `ListOfWords` will thus not update even though it has new words that shoud be rendered. +The problem is that `PureComponent` will do a simple comparison between the old and new values of `this.props.words`. Since this code mutates the `words` array in the `handleClick` method of `WordAdder`, the old and new values of `this.props.words` will compare as equal, even though the actual words in the array have changed. The `ListOfWords` will thus not update even though it has new words that should be rendered. ## The Power Of Not Mutating Data