1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

fix setInterval usage in mobx examples to work in firefox (#3769)

This commit is contained in:
vuldin 2018-02-12 02:02:05 -08:00 committed by Tim Neutkens
parent a8d07af355
commit 74866edc40
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ const Store = types
// mobx-state-tree doesn't allow anonymous callbacks changing data
// pass off to another action instead
self.update()
})
}, 1000)
}
function update () {

View file

@ -14,7 +14,7 @@ class Store {
this.timer = setInterval(() => {
this.lastUpdate = Date.now()
this.light = true
})
}, 1000)
}
stop = () => clearInterval(this.timer)