Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React StrictMode error #134

Open
cristian-gabbanini opened this issue Mar 7, 2019 · 2 comments
Open

React StrictMode error #134

cristian-gabbanini opened this issue Mar 7, 2019 · 2 comments

Comments

@cristian-gabbanini
Copy link

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 👍

@paulinfrancis
Copy link

#136

This PR fixes the issue. I'm not sure how you link an existing PR to an issue.

@cristian-gabbanini
Copy link
Author

cristian-gabbanini commented May 16, 2019

Hi,
I think you should be able to add in the body of your pull request one of these keywords: https://help.github.com/en/articles/closing-issues-using-keywords
So that when it will be merged, this issue will be automatically closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants