A
A
Ankozar2021-08-21 14:56:27
Vue.js
Ankozar, 2021-08-21 14:56:27

Why doesn't App.use(store) work?

import { createApp } from 'vue'
import store from './components/store/store.vue'
import App from './App.vue'

App.use(store)


Gives
_App_vue__WEBPACK_IMPORTED_MODULE_6__.default.use is not a function

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
low molecular macro, 2021-08-21
@molekulyarniy

you are trying to use a component as a middleware. If you are working with Vuex then you need to
import store from './components/store/store.js'

K
Kirill Romanov, 2021-08-22
@Djaler

https://next.vuex.vuejs.org/guide/#the-simplest-store
We look and see what is not used

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question