Open
Description
What problem does this feature solve?
our team just adopted VueJS recently and I really don't like using the mapXXX helpers for a couple of reasons.
- bad readability
- magic strings are hard to maintain and refactor
- can't navigate to the source in the IDE
I think it would be nice to access the module directly.
What does the proposed API look like?
const cart = {
actions: {
checkout ({ commit, state }, products) {
}
}
}
to dispatch checkout action, you can call the method directly.
$store.cart.actions.checkout(products)
I made a simple plugin vuex-help to access modules directly, but I think this would be a nice addition to the existing API.