Skip to content

Commit

Permalink
Support React 16.9 (#681)
Browse files Browse the repository at this point in the history
componentWillReceiveProps => UNSAFE_componentWillReceiveProps
  • Loading branch information
TheRusskiy authored and moroshko committed Dec 4, 2019
1 parent d626cef commit 4490f98
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 4490f98

Please sign in to comment.