question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

componentWillMount will be deprecated soon

See original GitHub issue

I’m submitting a …

  • feature request (kinda)

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.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:21
  • Comments:7

github_iconTop GitHub Comments

10reactions
annetterscommented, Sep 6, 2019

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

5reactions
gerhatcommented, Sep 20, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

React: componentWillMount to be deprecated! - Northcoders
React: componentWillMount to be deprecated! · All three methods are frequently use incorrectly and there are better alternatives. · When asynchronous rendering is ......
Read more >
componentWillMount is deprecated and will be removed in the ...
componentDidMount isn't deprecated and is definitely still safe to use, so there's no need to add UNSAFE_ to that method.
Read more >
React.Component
In the event of an error, you can render a fallback UI with componentDidCatch() by calling setState , but this will be deprecated...
Read more >
React JS componentDidMount() Methods and Functional ...
The method componentDidMount isn't deprecated and is perfectly safe to use, so it does not need to be accompanied by UNSAFE. ComponentWillMount ......
Read more >
Warning componentwillmount is Deprecated and will be ...
Warning componentwillmount is Deprecated and will be Removed in the Next Major Version in React Native Solved.The above lifecycle methods ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found