Move code out of deprecated componentWillUpdate()
> warning: Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate.
This commit is contained in:
parent
6a7f6805d9
commit
395cbdc2c9
1 changed files with 0 additions and 8 deletions
|
|
@ -1174,14 +1174,6 @@ export class Player extends React.Component {
|
|||
this.initSlider();
|
||||
}
|
||||
|
||||
componentWillUpdate(nextProps, nextState) {
|
||||
/* If we changed pause state or speed exponent */
|
||||
if (nextState.paused != this.state.paused ||
|
||||
nextState.speedExp != this.state.speedExp) {
|
||||
this.sync();
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
/* If we changed pause state or speed exponent */
|
||||
if (this.state.paused != prevState.paused ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue