A teammate and I have been building an application in Aurelia for the last four months, and he and I have been creating and using components in these two different ways. I want to have some consistency and change everything over to one of the two styles, but I don't know which one is preferred or more suitable for our needs.
I chose to use <compose>
because to me it feels cleaner and suits every need I have encountered, but if using the custom element is objectively better I want to switch to that.
For example:
(his-way view-model:)
import { bindable, bindingMode } from 'aurelia-framework';
export class HisWay {
@bindable({ defaultBindingMode: bindingMode.twoWay }) data;
}
(his-way view:)
<require from="./his-way"></require>
<his-way data.two-way="myModel" containerless></project-name>
(my-way view-model:)
export class MyWay {
activate(model) {
this.model = model;
}
}
(my-way view:)
<compose view-model="./my-way" model.bind="myModel" containerless></compose>
Do I need to change over, and if not, what are some reasons I can use to persuade him to using the same style that I have been using?