Updating Lifecycle Methods (Обновляющие методы жизненного цикла)
[EN]
The first time that a component instance renders, it does not update. A component updates every time that it renders, starting with the second render.
There are five updating lifecycle methods:
static getDerivedStateFromProps
shouldComponentUpdate
render
getSnapshotBeforeUpdate
componentDidUpdate
Whenever a component instance updates, it automatically calls all of these methods, in order.
[RU]
В момент первой отрисовки экземпляра компонента обновления не произойдет. Компонент обновляется каждый раз, как он отрисовывается, начиная со второй отрисовки.
Здесь находятся пять обновляющих методов жизненного цикла:
static getDerivedStateFromProps
shouldComponentUpdate
render
getSnapshotBeforeUpdate
componentDidUpdate
Всякий раз, когда экземпляр компонента обновляется, он автоматически вызывает все эти методы по порядку.