@marcoow wrote:
I'm just thinking about guidance to give beginners for implementing DDAU with the current release version of Ember that obviously doesn't enforce readonly attribute assignments for components and am actually not sure whether I'm missing sth. or whether this is actually sth. that doesn't currently work as it should.
When attributes are assigned using the
readonly
helper which as far as I'm aware of is the way to go to enforce DDAU currently those attributes aren't directly reassignable but any properties of them might still be modifiable which I think would violate DDAU. A simp,e example would be, e.g.{{settings-pane user=(readonly user) on-change=(action 'updateUser')}}
of course the
user
attribute of the outer context would not be reassignable from thesettings-pane
component but any of the user's properties could still be modified which would not actually be DDAU.Again, I'm not sure I'm just missing sth. here. Also, one could of course assign all the user's attributes that the component needs as separat attributes of the component but I'm not sure an example like this where an object is assigned to a component attribute is invalid per se. I'm thinking that the
readonly
would actually have to return a frozen instance of the object that would also not allow any modifications?
Posts: 2
Participants: 2