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

Update unsafe lifecycles #134

Closed
diegohaz opened this issue Apr 28, 2019 · 12 comments
Closed

Update unsafe lifecycles #134

diegohaz opened this issue Apr 28, 2019 · 12 comments

Comments

@diegohaz
Copy link

When using react-codemirror2 within <StrictMode /> or with React v16.9.0, it shows a few warnings on the console:

Warning: componentWillMount is deprecated and will be removed in the next major version. Use componentDidMount instead. As a temporary workaround, you can rename to UNSAFE_componentWillMount.

Please update the following components: Controlled

Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks
Warning: componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead.

Please update the following components: Controlled

Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks
@scniro
Copy link
Owner

scniro commented Apr 29, 2019

@diegohaz thanks for bringing this to my attention. Should be fixed in the 6.0.0 release 👍

@scniro scniro closed this as completed Apr 29, 2019
@diegohaz
Copy link
Author

Awesome. Thank you for maintaining this lib. 🙌

@diegohaz
Copy link
Author

diegohaz commented May 12, 2019

Hmm. I'm still getting the warning, but only one this time:

Warning: componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead.

Please update the following components: Controlled

Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks

@scniro
Copy link
Owner

scniro commented May 13, 2019

Interesting, surprised they are doing away with those ones too. Okay, will reopen and fix this up soon thanks for the detail.

@nickbeaulieu
Copy link

Is it possible to revisit this issue soon? I would like to use this package but I am not sure it is being actively maintained. Thanks!

@jestapinski
Copy link

Agreed, I see #151 for componentWillReceiveProps and am curious if we could get this released.

@ldeveber
Copy link

We are seeing this a lot and are wondering when a fix will be available?

chadoh added a commit to AutarkLabs/about that referenced this issue Dec 20, 2019
also update codemirror manually

still getting a `componentWillReceiveProps has been renamed, and is not
recommended for use` warning; being tracked at
scniro/react-codemirror2#134
PeterMPhillips pushed a commit to AutarkLabs/about that referenced this issue Dec 22, 2019
also update codemirror manually

still getting a `componentWillReceiveProps has been renamed, and is not
recommended for use` warning; being tracked at
scniro/react-codemirror2#134
@dannyseo517
Copy link

Is it possible to merge #151? Or get a fix for this? Would really like to use this library but reluctant since componentWillReceiveProps will not work at all after React 17 release

@Janpot
Copy link

Janpot commented Jan 17, 2020

fyi #151 will not work in react 17 either.

@dannyseo517
Copy link

I don't know if they said something else somewhere but their blog says

The new names like UNSAFE_componentWillMount will keep working in both React 16.9 and in React 17.x

from https://reactjs.org/blog/2019/08/08/react-v16.9.0.html

@scniro
Copy link
Owner

scniro commented Jan 19, 2020

@diegohaz @nickbeaulieu @ldeveber @kaniseo @Janpot I am a lot shorter on time these days as when I started this project. Codemirror & React APIs are moving to quickly for me to keep atop of for the day-to-day. I am looking for a co-maintainer of this project. Please contact me directly if you are interested. Thank you for understanding.

@fongandrew
Copy link
Collaborator

This should be resolved with #176 and v6.0.1 / v7.

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

No branches or pull requests

9 participants