You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The componentWillRecieveProps lifecycle hook is being deprecated, it would be nice if this library was refactored to not use it so it can continue to be used in React 16.3 StrictMode and future versions of React without warnings.
I believe the correct implementation of this would be to have getDerivedStateFromProps to pass the promise and status: statusTypes.none to state when nextProps.promise !== prevState.promise.
Thenf in componentDidUpdate run handlePromise when the promise in state/prevState changes.
The text was updated successfully, but these errors were encountered:
The
componentWillRecieveProps
lifecycle hook is being deprecated, it would be nice if this library was refactored to not use it so it can continue to be used in React 16.3 StrictMode and future versions of React without warnings.https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html
I believe the correct implementation of this would be to have
getDerivedStateFromProps
to pass the promise andstatus: statusTypes.none
to state whennextProps.promise !== prevState.promise
.Thenf in
componentDidUpdate
run handlePromise when the promise instate
/prevState
changes.The text was updated successfully, but these errors were encountered: