Commit 74866edc authored by vuldin's avatar vuldin Committed by Tim Neutkens

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

parent a8d07af3
...@@ -14,7 +14,7 @@ const Store = types ...@@ -14,7 +14,7 @@ const Store = types
// mobx-state-tree doesn't allow anonymous callbacks changing data // mobx-state-tree doesn't allow anonymous callbacks changing data
// pass off to another action instead // pass off to another action instead
self.update() self.update()
}) }, 1000)
} }
function update () { function update () {
......
...@@ -14,7 +14,7 @@ class Store { ...@@ -14,7 +14,7 @@ class Store {
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.lastUpdate = Date.now() this.lastUpdate = Date.now()
this.light = true this.light = true
}) }, 1000)
} }
stop = () => clearInterval(this.timer) stop = () => clearInterval(this.timer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment