deprecated • getDerivedStateFromProps is being added as a safer alternative to the legacy componentWillReceiveProps. • getSnapshotBeforeUpdate is being added to support safely reading properties from e.g. the DOM before updates are made.
the component tree without having to pass props down manually at every level. • Share data that can be considered “global” for a tree of React components • https://codepen.io/actuallyacat/pen/BxKzEa