Skip to content

Strict mode compatibility #227

Closed
Closed
@byronanderson

Description

@byronanderson

This library uses react's componentWillReceiveProps lifecycle, which has been deprecated in favor of componentDidUpdate and getDerivedStateFromProps for compatibility with async rendering (see here).

I'm going to take a stab at updating the library to use new APIs, but I figured I'd open this issue first to see if anyone was already aware of this.

It is my understanding that libraries doing this update typically add react-lifecycles-compat as a dependency so as to support both the old versions of react and the new versions of react. In this case, it is easy to implement the more restrictive getDerivedStateFromProps from componentWillReceiveProps, so I plan to implement the change in terms of getDerivedStateFromProps and use react-lifecycles-compat to support older react versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions