Vuex store or plugins generally
See original GitHub issueHi , I am currently playing around with this set of projects (using the CLI tool) . i wish to know how to use vuex store with this given that there is no new Vue instance that takes a store property or any other custom plugin for that matter that needs to be injected into the global vue object instance as a prototype or property. I tried creating a store plugin like in boot/setup.vue
Vue.use(VueNativeBase)
const store = createStore()
Vue.use(Vuex)
const storePlugin = {
install(Vue, options) {
Vue.prototype.$store = store
},
}
Vue.use(storePlugin)
but i get an errror that states
undefined is not an object (evaluating plugin.installed)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Plugins - Vuex
Vuex stores accept the plugins option that exposes hooks for each mutation. A Vuex plugin is simply a function that receives the store...
Read more >Plugins - Vuex ORM
Plugins usually add global-level functionality to Vuex ORM. Vuex ORM plugin works ... Vuex ORM Axios – A plugin to sync the store...
Read more >Creating a Vuex Plugin - Shawn Wildermuth
A Vuex plugin is a simple function that is called once during the setup of a Vuex store. Typically you'd just create the...
Read more >Make your vuex store globally available by registering it as a ...
Create a vuex store and attach it to the global Vue object so you can access it as this.$myStore from a component.
Read more >Is there a way to encapsulate Vuex store inside Vue plugin (its ...
Vuex plugin uses store option to assign store instance to Vue.prototype.$store , similarly to your own plugin. If the intention is to use ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@fergardi @atilacamurca i found it easier to just do this in
App.vue
otherwise you cannot use any of the vuex helpers
mapGetters
ormapActions
Guys, Vue presume you gonna use computed data to that go.