Dan Abramov
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
content/blog/2018-06-07-when-to-use-derived-state.md
|
|
@ -322,6 +322,8 @@ class Example extends PureComponent { |
|
|
|
}; |
|
|
|
|
|
|
|
render() { |
|
|
|
// The render method on this PureComponent is not called unless either |
|
|
|
// props.list or state.filterText have referentially different values. |
|
|
|
const filteredList = this.props.list.filter( |
|
|
|
item => item.text.includes(this.state.filterText) |
|
|
|
) |
|
|
|