You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My actions don't seem to get to my stores when fired. Or at least some of them don't. I am in an ES6 environment if that matters. Here are what I think are the relevant snippets. Any clue what I should do differently much appreciated.
I see the relevant action method firing fine in devtools when a setClass fires but the store method supposedly bound to it never fires. What am I doing wrong?
The text was updated successfully, but these errors were encountered:
My actions don't seem to get to my stores when fired. Or at least some of them don't. I am in an ES6 environment if that matters. Here are what I think are the relevant snippets. Any clue what I should do differently much appreciated.
`class RememberActions {
constructor(){
}
setClass(classId) {
let setObject = this.setObjectData.bind(this);
model.createObject(classId).then(
obj => {
setObject(obj, [], [], []);
return obj;
}
);
}
setObjectData(objData, tags, groups, roles){
let cls = utils.objectClass(objData);
return {
tags: tags,
groups: groups,
roles: roles,
object: objData,
expandedClass: model.getExpandedClass(cls)
}
}
export default alt.createActions(RememberActions);
'
and store like..
`
class ObjectStore {
constructor () {
Object.assign(this, defaultState);
this.bindListeners({
setObject: remember.setObjectData,
setAttribute: remember.setAttr,
setObjectNeighbors: remember.setNeighbors,
changeAssociation: remember.setAssociated,
removeAssoc: remember.removeAssociation,
});
}
setObject(objData) {
Object.assign(this, defaultState);
this.objectId = objectUUID(objData.object);
this.tags = objData.tags;
this.groups = objData.groups;
this.roles = objData.roles;
let cls = objData.expandedClass;
this.className = cls.name;
this.objectRef= cls.name + '(' + this.objectId + ')';
this.attrMap = cls.attrs.map(
(x) => [x, objData.object[x.name]]);
}
}
export default alt.createStore(ObjectStore, 'ObjectStore');
`
I see the relevant action method firing fine in devtools when a setClass fires but the store method supposedly bound to it never fires. What am I doing wrong?
The text was updated successfully, but these errors were encountered: