lifecycle react before component render code example Example: component did mmount componentDidUpdate(prevProps, prevState, snapshot)