Is it possible to log actions the same way I can log mutations with plugins?
I have a simple custom plugin to log mutations:
new Vuex.Store
plugins: [( (store) ->
store.subscribe (mutation, state) ->
console.log mutation.type, mutation.payload
)]
I wonder how can I log all actions called with store.dispatch
Hello @iabdulin
Thank your for your interest in this project.
However, your issue is a usage/support question, and the issue tracker is reserved exclusively for bug reports and feature requests (as outlined in our Contributing Guide).
We encourage you to ask it on the forum , Stack Overflow or on gitter and are happy to help you out there.
Short Answer: there's no official API to do this, currently.
reserved exclusively for bug reports and feature requests
I'd like to request this feature ;)
You can do that for quite some time now, we have store.subscribeAction() for that.
Oh great, thanks Linus!
Most helpful comment
You can do that for quite some time now, we have store.subscribeAction() for that.