diff --git a/react/features/large-video/components/Labels.web.js b/react/features/large-video/components/Labels.web.js index 703e1a513..930337c61 100644 --- a/react/features/large-video/components/Labels.web.js +++ b/react/features/large-video/components/Labels.web.js @@ -32,6 +32,19 @@ type State = { * @extends Component */ class Labels extends AbstractLabels { + /** + * Updates the state for whether or not the filmstrip is transitioning to + * a displayed state. + * + * @inheritdoc + */ + static getDerivedStateFromProps(props, prevState) { + return { + filmstripBecomingVisible: !prevState.filmstripBecomingVisible + && props._filmstripVisible + }; + } + /** * Initializes a new {@code Labels} instance. * @@ -46,22 +59,6 @@ class Labels extends AbstractLabels { }; } - /** - * Updates the state for whether or not the filmstrip is being toggled to - * display after having being hidden. - * - * @inheritdoc - * @param {Object} nextProps - The read-only props which this Component will - * receive. - * @returns {void} - */ - componentWillReceiveProps(nextProps) { - this.setState({ - filmstripBecomingVisible: nextProps._filmstripVisible - && !this.props._filmstripVisible - }); - } - /** * Implements React's {@link Component#render()}. *