Skip to content

Add store.override() #1102

@pkarw

Description

@pkarw

It would be nice to have an option to re-map the Vuex action used by core/store module in the VS

I see it as a method to extend the Vuex.store used by VS:-
store.override('product/list', (payload) => {})
or
store.override('product/list', 'mystore/list')

Then we need to override dispatch() method to make the usage of such a map. Of course, we'll be needing a dispatchOriginal() to execute the original action and allow the extension developers to modify the result

Such a "cheap IoC" could be of course generating some issues - like never be sure which exact method will be executed when few extensions will override some basic actions. Although it's still kind of useful option to modify the ways data is loaded from ES / other sources - without modifying the core.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions