How can I access my states from a `.js` file using `mapState` in Vue.js?
I attempted to do so with the following code:
import { mapState } from 'vuex';
const foo = {
...mapState(['axios']),
};
foo.axios.get('...');
Unfortunately, this approach did not work and resulted in the error:
TypeError: foo.axios.get is not a function
What steps should I take to successfully achieve this task?
I have looked into other solutions where they access state using `store.state. ...` instead of utilizing `mapState`, which is what I am aiming for.