Silence usages of componentWillReceiveProps
For https://github.com/vector-im/riot-web/issues/12877
This commit is contained in:
parent
ab6bd4104f
commit
47e5cfecf2
28 changed files with 56 additions and 30 deletions
|
@ -267,7 +267,8 @@ class FilteredList extends React.PureComponent {
|
|||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
// TODO: [REACT-WARNING] Replace with appropriate lifecycle event
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
if (this.props.children === nextProps.children && this.props.query === nextProps.query) return;
|
||||
this.setState({
|
||||
filteredChildren: FilteredList.filterChildren(nextProps.children, nextProps.query),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue