File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,16 +38,16 @@ class TimerWrapper extends Component {
3838 }
3939 }
4040
41- componentWillReceiveProps ( nextProps ) {
41+ componentDidUpdate ( prevProps ) {
4242 const {
4343 active,
4444 duration,
4545 time,
4646 onStart,
4747 onStop,
48- } = nextProps ;
48+ } = this . props ;
4949
50- if ( active === this . props . active && time !== this . props . time && time !== this . state . time ) {
50+ if ( prevProps . active === active && prevProps . time !== time && time !== this . state . time ) {
5151 const timeDiff = this . state . time - time ;
5252
5353 this . setState ( {
@@ -57,7 +57,7 @@ class TimerWrapper extends Component {
5757 return ;
5858 }
5959
60- if ( active !== this . props . active ) {
60+ if ( prevProps . active !== active ) {
6161 switch ( active ) {
6262 case true :
6363 const nextTime = duration !== null && this . state . time >= duration
You can’t perform that action at this time.
0 commit comments