Never call changeState of an external gadget
changeState
is supposed to be a private method to manage the gadget state internally.
Instead, gadgets are supposed to provide an explicit API (with .declareMethod
) usable from external gadget.
Good example:
return this.changeState({});
Bad example:
return this.getDeclaredGadget('random')
.push(function (gadget) {
return gadget.changeState({});
});