Throughout the user session managed by Vuex, I have a session storage value set to false that needs to be monitored. Setting up this value directly from the main.js file looks like this:
import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import axios from 'axios';
import store from './store'
createApp(App).use(store).use(router).mount('#app')
sessionStorage.setItem('session', false);
App.prototype.$http = axios
I'm considering whether it's appropriate to initialize it in main.js or if it would be better to do so elsewhere, maybe in App.vue.
Your insights are greatly appreciated!