Skip to content

Commit

Permalink
debounce, not throttle, render
Browse files Browse the repository at this point in the history
  • Loading branch information
Rik Smith-Unna committed Jul 2, 2017
1 parent fae9bb5 commit 78a7114
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/client/models/renderer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const throttle = require('lodash/throttle')
const debounce = require('lodash/debounce')

module.exports = (state, bus) => {
const render = () => bus.emit('render')
const queue = throttle(render, 250, { leading: true, trailing: true })
const queue = debounce(render, 250, { leading: true, trailing: true })
let frozen = false

const freeze = () => frozen = true
Expand Down

0 comments on commit 78a7114

Please sign in to comment.