Skip to content

Commit

Permalink
Support React 16.9 (moroshko#681)
Browse files Browse the repository at this point in the history
componentWillReceiveProps => UNSAFE_componentWillReceiveProps
  • Loading branch information
TheRusskiy authored and stephyeung committed Jan 25, 2021
1 parent 26b1b96 commit 7e3bdb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Autosuggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ export default class Autosuggest extends Component {
this.suggestionsContainer = this.autowhatever.itemsContainer;
}

componentWillReceiveProps(nextProps) {
// eslint-disable-next-line camelcase, react/sort-comp
UNSAFE_componentWillReceiveProps(nextProps) {
if (shallowEqualArrays(nextProps.suggestions, this.props.suggestions)) {
if (
nextProps.highlightFirstSuggestion &&
Expand Down

0 comments on commit 7e3bdb0

Please sign in to comment.