Asked  4 Months ago    Answers:  5   Viewed   563 times

I am a beginner with VueJs and this is my first App:

import { BootstrapVue } from 'bootstrap-vue'
import { createApp } from 'vue'
import App from './App.vue'
const myApp = createApp(App)

And when I save, nothing appears in my browser and it show this message in the Command:

warning  in ./src/main.js

"export 'default' (imported as 'Vue') was not found in 'vue'



Bootstrap-Vue does not yet support Vue 3. So if you want to use Bootstrap-Vue you will have to stick with Vue 2 for now.

In general, most of the libraries don't support Vue 3 yet, so I would suggest waiting a bit longer before using it until the ecosystem has caught up.


The reason this is happening is because in Vue 2, Vue provides a default export export default vue, which allows BootstrapVue to use import Vue from 'vue'.

However, in Vue 3 this has changed, and Vue does no longer provide a default export, and instead uses named exports. So when BootstrapVue uses the following line import Vue from 'vue', the error occurs.

Friday, June 25, 2021
answered 4 Months ago

You should not use component's watchers to listen to state change. I recommend you to use getters functions and then map them inside your component.

import { mapGetters } from 'vuex'

export default {
  computed: {
      myState: 'getMyState'

In your store:

const getters = {
  getMyState: state => state.my_state

You should be able to listen to any changes made to your store by using this.myState in your component.

Wednesday, June 2, 2021
answered 5 Months ago

should be

Wednesday, August 18, 2021
answered 2 Months ago

When you declare:

new Vue({
    el: '#app',
    data () {
      return {}

That is typically your root Vue instance that the rest of the application descends from. This hangs off the root element declared in an html document, for example:

    <div id="app"></div>

The other syntax is declaring a component which can be registered and reused later. For example, if you create a single file component like:

// my-component.js
export default {
    name: 'my-component',
    data () {
      return {}

You can later import this and use it like:

// another-component.js
  import myComponent from 'my-component'
  export default {
    components: {
    data () {
      return {}

Also, be sure to declare your data properties as functions, otherwise they are not going to be reactive.

Friday, September 3, 2021
answered 2 Months ago

Mutations can't dispatch further actions, but actions can dispatch other actions. So one option is to have an action commit the mutation then trigger the filter action.

Another option, if possible, would be to have all filters be getters that just naturally react to data changes like a computed property would.

Example of actions calling other actions:

// store.js
export default {
  mutations: {
    setReviews(state, payload) { = payload

  actions: {
    filter() {
      // ...

    setReviews({ dispatch, commit }, payload) {
      commit('setReviews', payload)

// Component.vue
import { mapActions } from 'vuex';

export default {
  methods: {
    foo() {
Saturday, September 18, 2021
answered 1 Month ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :