Skip to content

Get rid of UNSAFE_ warnings in browser console #292

@Sunphinx

Description

@Sunphinx

Is your feature request related to a problem? Please describe.
The library gives this warning to browser console:
"backend.js:6 Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details."

and:

backend.js:6 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.

Describe the solution you'd like
To get rid of the warnings in console, I see there is two solutions: either move using react hooks (react version 16.8) and replace the lifecycle methods by useEffect, or add the UNSAFE -prefix before the lifecycle methods (more information: https://fb.me/react-async-component-lifecycle-hooks).

To reproduce: use the component and open browsers console. I'm not sure if this warning comes with older react versions but the one i'm using is 16.9.0.

Describe alternatives you've considered

Additional context
image

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