class components react render component once code example Example: component did mmount componentDidUpdate(prevProps, prevState, snapshot)