nkbt / react-debounce-input

React component that renders Input with debounced onChange
MIT License
450 stars 61 forks source link

Comply with React.StrictMode #111

Closed cyrus-za closed 4 years ago

cyrus-za commented 5 years ago

To work with React.StrictMode we need to move away from deprecated methods such as componentWillReceiveProps.

This should be switched to getDerivedStateFromProps, but it should be static so this can't be referenced. We, therefore, need to do 2 things: 1) this.isDebouncing needs to move to State 2) this.createNotifier needs to move to componendDidUpdate

This has not been tested yet so please test before merging. I am using in my own code but have not had time to properly test it yet.

nkbt commented 4 years ago

Fixed by #115