The vuex docs specify that you have to pass the created store to the vue instance like so
new Vue({
el: '#app',
store: store,
})
My problem is that I created a new vue project using the CLI, and that mounts the app in mian.js using create app like so:
import App from './App.vue'
const app = createApp(App)
app.mount('#app')
How to I pass the store using the second method so I can acces it from any component, or how do I correctly mount the app using the first method ? What's the difference between them ?
From my understanding createApp() is new in vue 3, I'm not sure how it works, I can't seem to find the right docs, what's the difference between new Vue({}) and createApp() ?
I'm sure I'm not understanding some basic concept, but I don't know which one...
Thank you.