Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to new lifecycle hooks #20

Open
dantman opened this issue Apr 19, 2018 · 0 comments
Open

Move to new lifecycle hooks #20

dantman opened this issue Apr 19, 2018 · 0 comments
Milestone

Comments

@dantman
Copy link

dantman commented Apr 19, 2018

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 and status: statusTypes.none to state when nextProps.promise !== prevState.promise.
Thenf in componentDidUpdate run handlePromise when the promise in state/prevState changes.

@capaj capaj added this to the 2.2.0 milestone Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants