I’m trying and failing to get some values out of my vuex store and into F7 router.
I’m using the exact same export/import syntax I used successfully with Vue-Router, but with F7 router it just doesn’t work. My booleans all come in false, and strings come in as null. It’s driving me batty!
In Vue devtools the boolean in question is true. But in F7 router it is false.
The really infuriating thing is that this works perfectly in Vue-Router.
Can someone please tell me what I’m doing wrong, and how to do this correctly?
store.js
export const store = new Vuex.Store({
state:{},
getters:{},
mutations:{},
actions:{},
modules: {
auth,
chores,
house,
membership,
supply,
user
}
});
routes.js
import {store} from './store/store';
This is the actual routes property.
{
path: '/',
component: HomePage,
async(routeTo, routeFrom, resolve, reject,) {
if (store.state.user.belongsToHouse) {
console.log("value: " + store.state.user.belongsToHouse);
resolve({
component: JoinHouse})
}
else
{
console.log("value: " + store.state.user.belongsToHouse);
resolve({
component: HomePage})
}
}
},