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

Stop using legacy lifecycle methods #32

Closed
ntucker opened this issue Jan 28, 2019 · 3 comments · Fixed by #40
Closed

Stop using legacy lifecycle methods #32

ntucker opened this issue Jan 28, 2019 · 3 comments · Fixed by #40
Labels

Comments

@ntucker
Copy link

ntucker commented Jan 28, 2019


componentWillMount: Please update the following components to use componentDidMount instead: Uncontrolled(Component), Uncontrolled(Navbar)

componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: Uncontrolled(Component), Uncontrolled(Navbar)

https://fb.me/react-strict-mode-warnings

These have been around for quite some time. Using deprecated stuff considered harmful.

@aaryn101
Copy link

aaryn101 commented Mar 5, 2019

Is there any update to this? I want to use this library but I am concerned about what will happen when we move to React v17.

@jquense
Copy link
Owner

jquense commented Mar 5, 2019

i've not gotten around to updating, but will when it is pressing. in the meantime you can use the hook if you want to avoid the deprecated methods

nortonwong added a commit to nortonwong/uncontrollable that referenced this issue Sep 20, 2019
jquense pushed a commit that referenced this issue Oct 3, 2019
* fix(uncontrollable):  Migrate unsafe lifecycle

Fixes #32.

* Add more test statements for defaultValue.

* Revert change in favor of legacy prefix.

* Migrate to getDerivedStateFromProps.

* Fix tests.

* Bump minimum peerDependency.

* Use polyfill to avoid version bump.
@jquense
Copy link
Owner

jquense commented Oct 3, 2019

🎉 This issue has been resolved in version 7.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

3 participants