Login Register

data.store

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
}

How do I get a ref to a store I declaratively instantiated??? byJsId, byId, byFunction, byMagic???


function init()
{	
    // how do you get a ref to the paletteStore here?
}

dojo.addOnLoad(init);





Syndicate content