These are chat archives for canjs/canjs

30th
Apr 2015
Marshall Thompson
@marshallswain
Apr 30 2015 00:33
@matthewp It looks like the duplicate can.Component issue with steal-tools’ live-reload was caused by other nested components that were also binding to can.route.
Doing this makes it run smooth as butter:
import reload from 'live-reload';
reload(function(){
  var attrs = can.route.attr();
  can.route.attr({}, true).attr(attrs, true);
});
Matthew Phillips
@matthewp
Apr 30 2015 01:15
awesome!
Matthew Phillips
@matthewp
Apr 30 2015 01:31
@marshallswain live-reload is "module aware", which means you can import it into any module
and use reload.dipose
to tap into that module (the one you are in) being removed
Marshall Thompson
@marshallswain
Apr 30 2015 01:34
I'm looking forward to getting into the internals to understand what makes it tick. It works so well.
Josh Dean
@imjoshdean
Apr 30 2015 14:56
Hey @daffl and @justinbmeyer so maybe you can help me out on this - or slap me down and call me crazy
But if memory serves, doing something like class="{{#if check}}check{{/if}}" is more efficient than doing {{#if check}}class="check"{{/if}} - but for the life of me I cannot remember the reason as to why.
Justin Meyer
@justinbmeyer
Apr 30 2015 16:09
@imjoshdean slightly more efficient
because we only have to set a single property
the other way, we have to parse out the properties and values
and, I think keep track of what we set before
Josh Dean
@imjoshdean
Apr 30 2015 16:10
So would you attribute it to being a micro optimization or something more
Josh Dean
@imjoshdean
Apr 30 2015 16:15
?
Justin Meyer
@justinbmeyer
Apr 30 2015 16:16
@imjoshdean a micro optimization probably
only would probably matter if you are doing an animation or something
Josh Dean
@imjoshdean
Apr 30 2015 16:17
Alright. Thanks much :)