JSFiddle - React, Tailwind, and code Playground
by Chase Wilson
JavaScript
App.Person = SC.Object.extend({
firstName: null,
lastName: null,
fullName: function(){
return this.get('firstName') + ' ' + this.get('lastName');
}.property('firstName', 'lastName')
});
var person = App.Person.create({
firstName: 'Peter',
lastName: 'Wagenet'
});
person.get('fullName'); // Peter Wagenet
person.set('lastName', 'Smith');
person.get('fullName'); // Peter Smith