TommyD
TommyD

Reputation: 1043

Global Map Mutations

I use have to drop the following code in every single component in my SPA.

import { mapMutations } from "vuex";

Is there a way to make this import "Global"? Even putting in in my main app.js does not work.

Upvotes: 0

Views: 157

Answers (1)

Erdogan Oksuz
Erdogan Oksuz

Reputation: 621

Maybe global mixins solve this problem.

https://v2.vuejs.org/v2/guide/mixins.html#Global-Mixin

Upvotes: 1

Related Questions