The code below is from React
, which updates the DOM dynamically. I used the tutorial by Facebook react but did not understand the whole code, i.e which part of the
You can find more general explanation on React official page. Generally the react lifecycle can be described by the following stages (which can repeat multiple times once the components is created):
constructor(){ ... }
componentDidMount(){...}
myArrowFunction = () => {
...
this.setState({...})
...
}
componentDidUpdate()}{...}
shouldComponentUpdate(){...}
componentWillUnmount(){...}
render(){...}