Change in lifecycle method

auto_join_3.3
Håvar Aambø Fosstveit 2020-05-01 23:33:59 +02:00
parent 3e858ae6cd
commit c0507daabc
1 changed files with 6 additions and 3 deletions

View File

@ -81,11 +81,14 @@ class FullView extends React.PureComponent
this._setTracks(videoTrack); this._setTracks(videoTrack);
} }
componentDidUpdate() componentDidUpdate(prevProps)
{ {
const { videoTrack } = this.props; if (prevProps !== this.props)
{
const { videoTrack } = this.props;
this._setTracks(videoTrack); this._setTracks(videoTrack);
}
} }
_setTracks(videoTrack) _setTracks(videoTrack)