It turns out that this is a limitation in pinia setup stores.
My currentlyAnOptionsStore has an action theMotherAction calling functionA and functionB in a setup store $onAction is not triggered if a store calls its own action :(
export const useMyStore = defineStore('myStore', () => {
const functionA = (data) => {
// do stuff
}
const theMotherAction = (msg) => {
const data = msg.data;
functionA(data);
}
return {functionA, theMotherAction}
})
One can solve it rather ugly by calling useMyStore in the mother action like this
const theMotherAction = (msg) => {
const data = msg.data;
useMyStore().functionA(data);
}
I'm considering reverting back to use an options store