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
From an action in one module I want to call a getter in another module. I'm able to do it with context.rootGetters["namespace/getter"] but it doesn't feel like the typescript way to do it. Trying to call the read static function I can't figure out how to get the right ActionContext to pass into the getter.
The text was updated successfully, but these errors were encountered:
I needed to use accessors from one module inside of the actions of another.
As the context shape of the second module is different, I was having type errors.
Specifically, I have a main module with some actions, getters, and mutations that I needed to call from an admin module.
I needed to be able to keep the type checks everywhere, but in a way that allowed me to pass a different context (that still has the same dispatch and commit methods, etc, but different state shape), to be able to call accessors from main from inside the actions of admin, with the context of those admin actions.
From an action in one module I want to call a getter in another module. I'm able to do it with context.rootGetters["namespace/getter"] but it doesn't feel like the typescript way to do it. Trying to call the read static function I can't figure out how to get the right ActionContext to pass into the getter.
The text was updated successfully, but these errors were encountered: