3 ms·
HTMLBars is rendering to DOM instead of to string, to enable React-level performance: http://jsfiddle.net/Ut2X6/10/ http://jsfiddle.net/Ut2X6/10/
by avolcano 13y ago
HTMLBars is rendering to DOM instead of to string, to enable React-level performance: http://jsfiddle.net/Ut2X6/10/ http://jsfiddle.net/Ut2X6/10/
- ssorallen 13y agoThanks for the demo link; I hadn't heard of HTMLBars. It makes for a good demo I suppose, but I prefer React in a couple places: there's no separate template, style construction is done with an object and not a string (constructing that style string for HTMLBars seems error prone), and the connection between the values on the Ember object and how they will be used in the DOM is guessed only by naming convention. You could use `this.set('hotdogs', count % 255)` and reference 'hotdogs' in your template in place of 'color'.
- peterhunt 13y agoThere is a very nuanced set of performance (mem and cpu) and usability tradeoffs you make when adopting a dirty checking vs change tracking system. I'm working on coming up with a reasonable talk about it.