captivationsoftware / react-sticky

<Sticky /> component for awesome React apps
MIT License
2.64k stars 385 forks source link

componentWillMount will be deprecated soon #285

Open TimothyJones opened 5 years ago

TimothyJones commented 5 years ago

I'm submitting a ...

In the future, componentWillMount is going to be deprecated. Looks like this is going to be in the next version of react, as 16.9.0-alpha.0 generates the following warning:

react-dom.development.js:11963 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: Sticky

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

Demo here

If you'd like, I can make a PR fixing this.

macrozone commented 5 years ago

would be cool if this would be fixed soon!

annetters commented 5 years ago

My console is now getting a big yellow warning about componentWillMount being deprecated. Will react-sticky be updated soon so we can get rid of this error?

image

gerhat commented 5 years ago

Here is a pull request for the warning: https://github.com/captivationsoftware/react-sticky/pull/292

Indigo744 commented 5 years ago

Since it seems this lib is dead (#291), does anyone know a worthy alternative that plays nice with React 16.11?

zidianlyu commented 4 years ago

Any updates on this? Thanks!

ebrearley commented 4 years ago

I normally hate this kind of thing, but since React 17 is now in RC, I've forked and merged #292 as a stop gap between now and the revival of this repo.

Published to npm as react-sticky-17.

My apologies go out to the maintainers of this repository.

TimothyJones commented 4 years ago

@ebrearley: That's great, thanks for taking the initiaive!

There's a note in the readme of this repo that it won't be maintained any more (since Oct 2019), so I think a fork is probably appropriate. Are you able to maintain your fork moving forward? Happy to help out if it will make the difference between a yes and a no :)