React lifecycle methods
/*
Lifecycle Functions
Before component is loaded, loaded components, assemblies and components updated data destruction method of triggering a series --- which is a function of the life cycle of components
When components are loaded trigger lifecycle functions:
constructor, UNSAFE_componentWillMount (old version componentWillMount, obsolete),
render、componentDidMount
When the updated components triggered lifecycle functions:
shouldComponentUpdate (two parameters nextProps, nextState),
UNSAFE_componentWillUpdate (old version componentWillUpdate, obsolete),
render、componentDidUpdate
You change the props of traditional values in the parent component inside when triggered:
componentWillReceiveProps
When triggered the destruction of the component lifecycle methods:
UNSAFE_componentWillReceiveProps (old version componentWillUnmount, obsolete)
*/
// React to rename the new version of the life cycle of a function
// componentWillMount → UNSAFE_componentWillMount
// componentWillReceiveProps → UNSAFE_componentWillReceiveProps
// componentWillUpdate → UNSAFE_componentWillUpdate