MitsuhaKitsune / vuex-webextensions

A Vuex plugin to share store through webextensions components
MIT License
83 stars 30 forks source link

Store actions sync #24

Closed bbird1980 closed 4 years ago

bbird1980 commented 5 years ago

https://github.com/MitsuhaKitsune/vuex-webextensions/blob/eec51ff6652d497b010115a625dafdda9e4d4f85/src/backgroundScript.js#L35

Do you plan to implement this.store.subscribeAction? I need to capture action invokation in popup via background's, but only mutations fired...

store.subscribe(({type, payload}) => {
    console.log(`[syncWithStore][mutation] type %o, payload %o`, type, payload);
});
store.subscribeAction(({type, payload}) => {
    console.log(`[syncWithStore][action] type %o, payload %o`, type, payload);
});
MitsuhaKitsune commented 5 years ago

Yes sorry, I didn't implement it before because when I start the plugin vuex don't have this method implemented (it's a new API method of vuex => 2.5.0).

I think that I can implement and relase this feature tomorrow.

A lot of thanks for the report, didn't know that this method are available on vuex.

MitsuhaKitsune commented 4 years ago

Implemented on a508561 and available on last version 1.3.0 of npm, a lot of thanks for the sugestion ^^