3 ms·
To prevent layout thrashing yourself, you can use this library: https://github.com/wilsonpage/fastdom https://github.com/wilsonpage/fastdom Ember.JS (and possi
by sync 13y ago
To prevent layout thrashing yourself, you can use this library: https://github.com/wilsonpage/fastdom https://github.com/wilsonpage/fastdom
Ember.JS (and possibly Angular?) does this for you automatically.
- spicyj 13y ago(React does too.)
- httpteapot 13y agoMeteor UI does it as well.
- zcrar70 13y agoAngular doesn't do this (batch DOM updates) - but because Angular's $digest cycle is a batch, it's fairly close (or at least, less bad than Backbone's default behaviour). Dirty checking and watch execution happens in batches, but the resulting DOM updates are executed ad-hoc within each batch iteration - without any regard for requestAnimationFrame or forced synchronous layouts for instance.
- Cthulhu_ 13y agoWould it be possible / beneficial / desirable to add something like this to Angular?
- jpdlla 13y agoDidn't know about fastdom, thanks for sharing!