Skip to content

Commit

Permalink
Run throttled render on leading and trailing edge
Browse files Browse the repository at this point in the history
  • Loading branch information
Rik Smith-Unna committed Jun 25, 2017
1 parent 01a85aa commit 1a7378a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/client/models/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const throttle = require('lodash/throttle')

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

const mayberender = () => {
if (state.reading) {
Expand Down

0 comments on commit 1a7378a

Please sign in to comment.