use animation best practices in dbmon

This commit is contained in:
Leo Horie 2016-12-02 20:44:03 -05:00
parent 2f7c4983f3
commit 4a4bd7a548
8 changed files with 48 additions and 2299 deletions

View file

@ -38,14 +38,13 @@ var DBMon = React.createClass({
var root = document.getElementById("app")
function update() {
requestAnimationFrame(update)
data = ENV.generateData().toArray()
perfMonitor.startProfile("render")
ReactDOM.render(h(DBMon, null), root)
perfMonitor.endProfile("render")
setTimeout(update, ENV.timeout)
}
update()