Can anyone explain which is better, Handlebar Helpers or Ember Components from a performance side, and use-cases.
For example. I use components for buttons like follow and other elements that might need bubbling up events. Other than this case how can I decide which one to use? Case like characters left, and formatting text to have @mentions and urls
When I was writing that code, I got to a point where I needed to write code that would check if certain elements existed on the page. By using the component, I was guaranteed that the elements existed and it was easy to handle their events inside of the component.
Helpers are more like functions inside of your template. They’re great for modifying presentation of values, for example if you wanted to add $ sign to currency fields. This kinds of detail is relevant in presentation but not in the logic, so it makes more sense to create a helper rather than keeping that create another property in the view or a controller.
Interesting. So I added this.$().foundation(); to didInsertElement inside one of the Views and for that view instead of the slider images being stacked, the slider was gone completely. However, when I open inspector the slider renders properly? Here’s the view:
@jtrinker I’ve removed the first call to $(document).fundation() and let only the one in the component’s didInsertElement hook, have a look at this working jsbin. Find also the same answer on SO