Skip to content

React 16.x will deprecate some lifecycle functions that we use as they are unsafe #164

@Mehuge

Description

@Mehuge

https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html

As of React 16.3, UNSAFE_componentWillMount, UNSAFE_componentWillReceiveProps and UNSAFE_componentWillUpdate will be introduced, then in a 16.x release, the original methods will be deprecated. Then, in React 17, support for the non- UNSAFE_ prefixed versions will be dropped.

This is in preparation for React async rendering.

The above blog post goes into detail about the reasoning behind this and has several examples of when these lifecycle methods might be used and how to update those components to avoid using those methods making them safe to use with async rendering.

There are currently the following counts of references to these methods in the Camelot-Unchained project.

8 componentWillMount
33 componentWillReceiveProps
11 componentWillUpdate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions