Browse Source

Add another comment to PureComponent example

main
Dan Abramov 6 years ago
committed by GitHub
parent
commit
6ec35c784a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/blog/2018-06-07-when-to-use-derived-state.md

2
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)
)

Loading…
Cancel
Save