how to use getSnapshotbeforeupdate with component willupdate code example Example: component did mmount componentDidUpdate(prevProps, prevState, snapshot)