Mapping Vuex getters/mutations/actions to global mixin?

import Vue from 'vue';
import { mapGetters } from 'vuex';

Vue.mixin({
    computed: {
        ...mapGetters({
            $$users: 'users'
        })
    }
});

Is something like this considered a bad practice? I figured this way, every component has access to the store in a more convenient way. And with the $$ abbreviation, nothing should collide. Obviously, not every component will need every getter, mutation, action, etc. But are there any big pitfalls to this approach? Does this hurt performance in any noticeable way?

#vue-js

1 Likes34.00 GEEK