Virtual DOM
under the hood
"Dirty checking" is to poll the data at regular intervals and recursively check all the values in the data structure.
"Observable" is to observe the state change. If nothing has changed, we do nothing. If changed, we know exactly what needs to be updated.
1.Efficient comparison algorithms.
2.Grouping read & write operations when working with DOM.
3.Efficient updating of only sub-trees.
componentWillMount - [D]St/O - Sr
componentWillReceiveProps - [D]StPr - Sr
shouldComponentUpdate - O - St/Sr
componentWillUpdate - [D]StPt - Sr
componentDidUpdate - Sr - St
componentDidMount - Sr - St
componentWillUnmount - Del - St
(Preact)
ComponentDidUnMount - Sr - St
(React)
componentDidCatch - Err
static getDerivedStateFromProps - (2)StPr - Sr
getSnapshotBeforeUpdate - PreCommitPhase