React Lifecycle methods: constructor() getDerivedStateFromProps() render() componentDidMount() A component is updated whenever there is a change in the component's state or props . React has five built-in methods that gets called, in this order, when a component is updated: getDerivedStateFromProps() shouldComponentUpdate() render() getSnapshotBeforeUpdate() componentDidUpdate() In the getSnapshotBeforeUpdate() method you have access to the props and state before the update, meaning that even after the update, you can check what the values were before the update. If the getSnapshotBeforeUpdate() method is present, you should also include the componentDidUpdate() method, otherwise you will get an error. the most reason for writing a method as a class property is when the method will be passed as a callback, and you need it to always be bound to the instance . React lifecycle m...