Currently, I am exploring Vuex and have come across the concepts of using Actions
instead of Mutations
when dealing with asynchronous code.
I find myself pondering whether it is more beneficial to handle all the asynchronous logic within the action itself or if it would be better to perform the asynchronous work in the component and simply commit Mutations
within the then
call?
In essence, I'm curious if this approach aligns with best practices in the realm of Vuex, or if it would be advisable to shift the API call to a state Action
instead?
https://i.sstatic.net/Gv8TQ.png
Thank you.