简体   繁体   中英

TypeError: this.$store.dipatch is not a function

I am learning Vue and currently struggling with this error.

TypeError: this.$store.dipatch is not a function

I have made store.js file and trying to access the actions from a vue file.

I have searched alot about the same but couldn't find any solution. Any idea what might be the cause ?

You have a typo. Try this:

this.$store.dispatch('yourActionName')

Read More in the following link: Vuex

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM