mardi 9 février 2016

Using component vs partial for 'site header' in ember.js

This is more of a design/best practice question, in Ember 2.x

I am building a new ember web app, and for the site's header, I created a separate component, site-header and included that in the application.hbs as follows.

application.hbs

{{site-header}}
{{outlet}}

I am trying to find out, if using a partial instead of a component might be a better choice, for the following reasons:

This component, site-header...

  • is used only in application.hbs
  • doesn't maintain any state
  • has no actions associated with it (just some links to change the route ).

Aucun commentaire:

Enregistrer un commentaire