How to use the fastdom.defer function in fastdom

To help you get started, we’ve selected a few fastdom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bmcmahen / cast / index.js View on Github external
Cast.prototype.renderNew = function(block){
  this.emit('render', block)
  fastdom.write(function(){
    this.el.appendChild(block.el);
  }.bind(this));
  fastdom.defer(block.show.bind(block));
};

fastdom

Eliminates layout thrashing by batching DOM read/write operations

MIT
Latest version published 5 months ago

Package Health Score

72 / 100
Full package analysis

Similar packages