April 2018
Beginner
536 pages
13h 21m
English
When a component extends the Component class, it is possible to implement some component life cycle hooks. The companion source code includes a component named MoviePage that declares a component life cycle hook named componentWillMount:
class MoviePage extends React.Component {
// ...
public componentWillMount() {
this.movieStore.getAll();
}
public render() {
// ...
React allows us to declare multiple component life cycle hooks. Covering all the available React component life cycle hooks is out of the scope of this book. However, it is important to understand that the events are organized into three main phases: