Knockout computed observables in ES6 I am trying out for the first time knockoutjs and babeljs and have a question on how to do computed observables properly. Both fullName and fullNameComp properties are updated whenever firstName and lastName changes so not sure about pros/cons:

&lt;h2&gt;employee&lt;/h2&gt;

&lt;input type="text" data-bind="value: firstName, valueUpdate: 'keyup'" /&gt;
&lt;input type="text" data-bind="value: lastName, valueUpdate: 'keyup'" /&gt;

&lt;p&gt;Full name getter: &lt;spane data-bind='text: fullName'&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Full name pure computed: &lt;span data-bind='text: fullNameComp'&gt;&lt;/span&gt;&lt;/p&gt;




import ko from 'knockout';
import templateMarkup from 'text!./employee.html';

class Employee {
constructor(params) {
    this.firstName = ko.observable('John');
    this.lastName = ko.observable('Smith');
    this.fullNameComp = ko.pureComputed(function() {
        return this.firstName() + " " + this.lastName();
      }, this);
}

get fullName() {
    return this.firstName() + ' ' + this.lastName();
}

dispose() {
    // This runs when the component is torn down. Put here any logic necessary to clean up,
    // for example cancelling setTimeouts or disposing Knockout subscriptions/computeds.
}
}

export default { viewModel: Employee, template: templateMarkup };
Your fullName() function will return the same result but only when called.  The computed will always have the updated value and can be used as a trigger for other code if needed.  For example, you can subscribe to fullNameComp but you cannot subscribe to fullName as it doesn't extend from KO's observable.

If the function fullName meets your needs then use it.