Use Vuex Actions to Delete Data from APIs in Nuxt and Vue.js

InstructorJohn Lindquist

Share this video with your friends

Send Tweet

You'll begin to notice as you build out your actions in Vuex, many of them will look quite similar. Creating a remove action looks almost the same as the add action except for using the axios.delete method then filtering out the deleted todo once the response comes back.

~ 4 years ago

hi I have set the following this on my web application, i get the following error any idea thx:

XMLHttpRequest cannot load http://localhost/mysite/api/category. No 'Access-Control-Allow- ... Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

Uncauget (in promise) error: noetwork error at createError (createERROR.js .. at xmlhttpRequer.handleError ..