What is the life cycle of a function declaration: function is a function of the life cycle components at a certain moment it will be automatically executed.
A: Mounting stage (Mounting) function to perform life cycle:
- componentWillMount () == UNSAFE_componentWillMount () said: component will be executed automatically mount the stage
- render () said: page content automatically executed when rendering
- componentDidMount () represents: the mount assembly to complete the automatic execution
When the page is first loaded ...
Two: the life cycle stages of the update function (updation) executed: props updates and states update function to perform life cycle
- shouldComponentUpdate () denotes: before updating function automatically performs data need to return true or false
- UNSAFE_componentWillUpdate () == componentWillUpdate () says: Before the update
- componentDidUpdate said: update complete
Three: Several other periodic function declaration:
- componentWillReceiveProps () said: only sub-components have this life-cycle function, when the sub-assembly receives new data transfer props parent component will perform.
- componentWillUnmount () says: function to execute the component to be removed when