There are a few life cycle methods that have been deprecated and renamed in React 17. We don't need to use these anymore—getDerivedStateFromProps and getSnapshotBeforeUpdate essentially replaced them. However, here's a brief description of these methods, in case you come across them in existing codebases:
- componentWillMount (now UNSAFE_componentWillMount): This is called before the component is added to the DOM during an initial render
- componentWillReceiveProps (now UNSAFE_componentWillReceiveProps): This is called when the component props change
- componentWillUpdate (now UNSAFE_componentWillUpdate): This is called just before a component updates