componentWillMount will be deprecated soon
See original GitHub issueI’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
If you’d like, I can make a PR fixing this.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:21
- Comments:7
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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?
Here is a pull request for the warning: https://github.com/captivationsoftware/react-sticky/pull/292