lundi 27 avril 2015

Ember best practice: Mixin vs Component

I have component B that extends from component A, also I have component D that extends from component C. Between B and D there is some share code to upload to s3 but they actually aren't much related. Still I don't like the code duplication but I don't know if I should:

  1. Write a mixin and import in both components.

  2. Make a component for this shared code an import it on the other components.

What would be the ember way to do this?




Aucun commentaire:

Enregistrer un commentaire