what function should be called in update cycle before render in react native code example
Example 1: component did mmount
componentDidMount()
Example 2: component did mmount
componentDidUpdate(prevProps, prevState, snapshot)
componentDidMount()
componentDidUpdate(prevProps, prevState, snapshot)