Quantcast
Viewing all articles
Browse latest Browse all 4829

Performances using plugin like ember-truth-helpers instead of just the Ember default way

@johnunclesam wrote:

If I use this plugin: https://github.com/jmurphyau/ember-truth-helpers

with many, let's say,

{{#if (eq model.beautiful true) }}

or

{{#if (or (eq model.beautiful true) (eq model.crazy true) ) }}

what is Ember creating in background? The same javascript works of computedProperties like these:

isBeautiful: Ember.computed.equal('model.beautiful', true); and so on?

If I have 30 computedProperty (Ember macros and custom ones) it's better to use this plugin or the default Ember way?

I'm wondering because in some templates I can have something like this many many times!:

{{#if (or (eq model.beautiful true) (eq model.crazy true) ) }}

instead of just this one:

{{#if isBeautifulOrCrazy }}

What is the best solution in terms of performances?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles