I was looking at the guides for computed properties and saw the section talking about brace expansion for dependent keys. The example shown is:
fullName: computed('{firstName,lastName}', function() {
let firstName = this.get('firstName');
let lastName = this.get('lastName');
return `${firstName} ${lastName}`;
})
I had always thought it was bad practice to do brace expansion on this. I.e.
person.{firstName,lastName} would be fine but {firstName,lastName} isn't. I feel like otherwise, you would never not use brace expansion. You could do things like:
{someService.foo.bar,person.firstName,income,etc}
I was looking at the guides for computed properties and saw the section talking about brace expansion for dependent keys. The example shown is:
I had always thought it was bad practice to do brace expansion on
this
. I.e.person.{firstName,lastName}
would be fine but{firstName,lastName}
isn't. I feel like otherwise, you would never not use brace expansion. You could do things like:{someService.foo.bar,person.firstName,income,etc}