Login Register

dojo10

Is referencing storeItem._S to get the store reference bad?

Items get passed around a lot and normally I can pass the store around with them but in this case the item can't be accompanied by a store is it wrong to do the below?

constructor(item) 
{
    this.store = item._S; // NOTE: Is this bad???
    this.item = item;

    this.name = this.store.getValue(this.item, "name");
    etc
}
Syndicate content