You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can only update a mounted or mounting component. This usually means you called setState, replaceState, or forceUpdate on an unmounted component. This is a no-op. Please check the code for the AnimateNumber component.
#8
Open
marlti7 opened this issue
Jun 21, 2017
· 4 comments
find a way to fix this bug , this bug because the Timer won't unmount when your component unmounts.
so set clearTimeout when componentWillUnmount();
code like this :
startAnimate(){this.timer=Timer.setTimeout(()=>{console.log('I do not leak!');},500);}componentWillUnmount(){clearTimeout(this.timer);}
When I go back to a page,find this problem
The text was updated successfully, but these errors were encountered: