0👍
I’d construct your b store’s val as a default, not including any info from settings. Then have a mutation or action that sets it up properly from settings (a). Probably should be an Action, since Mutations only get the local state, whereas Actions get a context that includes the rootState
from which you can access the other modules.
Alternatively you can just use a getter for b.val
; getters have access to rootState
(and rootGetters
) as well.
Source:stackexchange.com