Skip to content

React StrictMode error #134

@cristian-gabbanini

Description

@cristian-gabbanini

Hi,
I am using your component in a few different apps and, by the way, I would like to thank you because it is very usefull and easy to use.

I recently enabled React.StrictMode in one of my apps and it showed me the following error:

Warning: Unsafe lifecycle methods were found within a strict-mode tree:
in StrictMode

componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: Toggle

react-toggle: v4.0.2
react: v16.8.2
react-dom: v16.8.2

React.StrictMode is pretty useful in spotting potential problems and I thouth it was worth opening an issue.
Many thanks 👍

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