Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vuex dispatch is a promise

actions in Vuex are asynchronous. The only way to let the
calling function (initiator of action) to know that an
action is complete - is by returning a Promise and resolving it later.

Here is an example: myAction returns a Promise, makes a http
call and resolves or rejects the Promise later - all asynchronously
 
PREVIOUS NEXT
Tagged: #vuex #dispatch #promise
ADD COMMENT
Topic
Name
7+4 =