mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
15 lines
325 B
JavaScript
15 lines
325 B
JavaScript
var ForceUpdate = function (interval) {
|
|
return {
|
|
componentDidMount: function () {
|
|
this.refreshTimer = setInterval(function () {
|
|
this.forceUpdate()
|
|
}.bind(this), interval)
|
|
},
|
|
componentWillUnmount: function () {
|
|
clearInterval(this.refreshTimer)
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = ForceUpdate
|