diff --git a/content/blog/2018-06-07-you-probably-dont-need-derived-state.md b/content/blog/2018-06-07-you-probably-dont-need-derived-state.md index 4932e706..0d9905a2 100644 --- a/content/blog/2018-06-07-you-probably-dont-need-derived-state.md +++ b/content/blog/2018-06-07-you-probably-dont-need-derived-state.md @@ -231,6 +231,11 @@ class Example extends Component { filterText: "", }; + // ******************************************************* + // NOTE: this example is NOT the recommended approach. + // See the examples below for our recommendations instead. + // ******************************************************* + static getDerivedStateFromProps(props, state) { // Re-run the filter whenever the list array or filter text change. // Note we need to store prevPropsList and prevFilterText to detect changes.