Have you had trouble understanding some of the react lifecycle methods and how to implement them without messing up? If your answer is yes, you are not alone. I have been using them with React Native apps, and I must admit that I have misused them multiple times and learned lessons the hard way. The React team has decided to deprecate some of the lifecycle methods with React 17. A recent from the reactjs team reveals the future of component lifecycle methods. blog post Why did they decide to get rid of them? The original lifecycle model was not intended for some of the upcoming features like async rendering. With the introduction of async rendering, some of these lifecycle methods will be unsafe if used. Legacy lifecycle methods have too many potential pitfalls to be safely used for async rendering. So what is going away? The lifecycle methods below will soon be deprecated. componentWillMount componentWillRecieveProps componentWillUpdate They are going to deprecate these methods in phases, so it won’t be an overnight change. I am sure many of us are using all three of them frequently. The above lifecycle methods are categorized as in the 16.3 release. Deprecation warnings will be added to the legacy methods in the release after that. Finally, the legacy methods will be deprecated completely in React 17. unsafe Interestingly, the methods will still be in use in React 17. unsafe What is new? The three old lifecycle methods are going to be renamed and two additional methods will be introduced as well. UNSAFE_componentWillMount UNSAFE_componentWillRecieveProps UNSAFE_componentWillUpdate getDerivedStateFromProps getSnapshotBeforeUpdate So the methods are not really gone, but they are marked unsafe. Programmers should be aware not to use them at all or sparingly use them with caution. Async rendering will cause to trigger multiple rendering of your component tree. This makes it unsafe. componentWillMount If you are wondering how server rendering will work in the future with just here is a response from explaining it. componentDidMount, Dan Abramov Safe Lifecycle Methods Here is what I gathered about the new lifecycle methods from the blog post. getDerivedStateFromProps static getDerivedStateFromProps(nextProps, prevState) { // ... } This method is going to handle what was able to do along with It is static. It is called after a component is created and also called when it receives a new prop. This will be the safer alternative to componentWillRecieveProps componentDidUpdate. componentWillRecieveProps. It returns an object to update state in response to prop changes. It would return null to indicate no change to state. React may call this method even if the props have not changed. getSnapshotBeforeUpdate getSnapshotBeforeUpdate(prevProps, prevState) { // ... } This is going to handle what was able to do along with This is called right before the DOM is updated. The value that is returned from is passed on to componentWillUpdate componentDidUpdate. getSnapshotBeforeUpdate componentDidUpdate. is called as soon as the DOM is updated. The value is passed on to componentDidUpdate snapshot componentDidUpdate. Resizing the window during an async rendering is a good use-case of when the can be utilized. getSnapshotBeforeUpdate Edit: As I was writing this post React 16.3.0 was released officially. Wohoo!!! In addition to the lifecycle method changes, they have released a new tool called It identifies and highlights unsafe lifecycle methods in components, and many other side-effects during development. Learn more about Strict Mode from their Strict Mode. blog post. For examples of the new lifecycle methods and their usage checkout the original blog post. To get a better understanding, checkout this video of the React team showcasing a preview of some of these cool new features. What do I think? When react component lifecycle methods were originally designed they did not have to worry about many of the futuristic use-cases like async rendering. Although these deprecations are not backward compatible, it is a step towards improvement and I like it. I am glad the react team has called out the legacy lifecycle methods as unsafe. This will prohibit anti-patterns and misuse of these methods. I am very excited to checkout React 16.3.0 to see all the new features that are in store for us developers. Let’s go have some fun. I am Adhithi Ravichandran a Software Consultant working on React Native Apps. I am also a Pluralsight Author and love teaching. You can checkout my latest course on React Native from below: pluralsight https://www.pluralsight.com/courses/react-native-big-picture For more information and posts from me visit and follow me on twitter . http://adhithiravichandran.com/ @AdhithiRavi