mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 02:36:36 +00:00
update design & refresh behavior
This commit is contained in:
14
browser/main/Mixins/ForceUpdate.js
Normal file
14
browser/main/Mixins/ForceUpdate.js
Normal file
@@ -0,0 +1,14 @@
|
||||
var ForceUpdate = function (interval) {
|
||||
return {
|
||||
componentDidMount: function () {
|
||||
this.refreshTimer = setInterval(function () {
|
||||
this.forceUpdate()
|
||||
}.bind(this), interval)
|
||||
},
|
||||
componentWillUnmount: function () {
|
||||
clearInterval(this.refreshTimer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ForceUpdate
|
||||
Reference in New Issue
Block a user