Dear Vuex Team,
I would like to know where can/should I put a helper method. In this example you can see that I'm writing a mutation that searches a query in the state from line 13 to 19 I put all the code in the single mutation. The code is just a super-easy example. I want to have some helpers methods to check the query and to actually perform the match so I can keep my code clean. How can I do that? From the mutations I cannot call any actions.
Thank you.
Mutations should be simple (and IMO without branches). Transfer all the logic to actions.
Fixed your fiddle, see if this works for you.
Hi, thanks for your interest in this project.
However, your issue seems usage/support question. If you want to ask such question, please use our forum or gitter. The issue list is reserved exclusively for bug reports and feature requests.
Thanks.
You can separate domain/infra logic that is not essentially related to Vuex out of Vuex modules (e.g. api directory of the shopping cart example).