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
{{ message }}
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.
Appears not to work properly, perhaps because used as a @mixin() ?
Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the undefined component.
warning @ warning.js?8a56:44
getInternalInstanceReadyForUpdate @ ReactUpdateQueue.js?fd2c:45
ReactUpdateQueue.enqueueSetState @ ReactUpdateQueue.js?fd2c:192
ReactComponent.setState @ ReactComponent.js?702a:67
_handleDismiss @ AlertBanner.js?c408:195
(anonymous function) @ TimerMixin.js?fbdb:18
.
import { mixin } from 'core-decorators'
import TimerMixin from 'react-timer-mixin'
Appears not to work properly, perhaps because used as a @mixin() ?
Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the undefined component.
warning @ warning.js?8a56:44
getInternalInstanceReadyForUpdate @ ReactUpdateQueue.js?fd2c:45
ReactUpdateQueue.enqueueSetState @ ReactUpdateQueue.js?fd2c:192
ReactComponent.setState @ ReactComponent.js?702a:67
_handleDismiss @ AlertBanner.js?c408:195
(anonymous function) @ TimerMixin.js?fbdb:18
.
import { mixin } from 'core-decorators'
import TimerMixin from 'react-timer-mixin'
@mixin(TimerMixin)
class AlertBanner {
render () {
this._setupDismissTimer()
...
}
_setupDismissTimer () {
let theTimer = this._dismissTimer
if (this.state.autoDismiss
&& this._isShowing(this.state.transition)) {
if (!theTimer) {
theTimer = this.setTimeout(
this._handleDismiss
, TIMEOUT)
}
}
else {
this._clearDismissTimer()
}
this._dismissTimer = theTimer
}
@autoBind
_handleMouseEnter () {
this._clearDismissTimer()
}
@autoBind
_handleMouseLeave () {
this._setupDismissTimer()
}
_clearDismissTimer () {
const timer = this._dismissTimer
this._dismissTimer = void 0
if (timer) {
this.clearTimeout(timer)
}
}
}
I have to add this method to prevent an error, but I thought that was the point of this mixin to not have to clear any timers before we unmount.
The text was updated successfully, but these errors were encountered: