React Native Component Lifecycle

What is the purpose of the getSnapshotBeforeUpdate method in React Native?