update the components in react native code example Example: component did mmount componentDidUpdate(prevProps, prevState, snapshot)