Skip to content

Move to new lifecycle hooks #20

@dantman

Description

@dantman

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions