- First
getDefaultProps
mount:getInitialState
,componentWillMount
,render
, ,componentDidMount
- Uninstall:
componentWillUnmount
getInitialState
Remount:componentWillMount
,render
, ,componentDidMount
- Component
componentWillReceiveProps
Update:shouldCompnentUpdate
,componentWillUpdate
, ,componentDidUpdate
Why remount when there is no getDefaultProps
, because React, the life cycle management through three stages: MOUNTING, RECEIVE_PROPS and UNMOUNTING, 3 phases correspond to three methods: mountComponent, updateComponent and ummountComponent; mountComponent which is responsible for managing the life cycle getInitialState
, , componentWillMount
, render
, componentDidMount
as getDefaultProps
is managed by the constructor, but also the entire life cycle of the first to begin, and mountComponent unable to call getDefaultProps
, so why getDefaultProps
one of the reasons execute only.
: Original Big Box perform different React order life cycle component status