How to return Promises from Vuex actions?

Answer • 1 Asked • Jun 13 2019
This one I feel is good by design, but don't know if it contradicts the Vuex cycle of uni-directional data flow.

Basically, is it considered good practice to return a promise(-like) object from an action? I treat these as async wrappers, with states of failure and the like, so seems like a good fit to return a promise. Contrarily mutators just change things, and are the pure structures within a store/module.

Write your answer...

On a mission to build Next-Gen Community Platform for Developers