In /store/user/getters.js:
function getLoggedIn (state) {
return state.loggedIn
}
In another file: router-auth.js, I try to get the getters.getLoggedIn's value (true or false) like this:
import user from '../store/user'
const loggedIn = user.getters.getLoggedIn
console.log(user.getters.getLoggedIn)
Oddly, it returns the source code of the function instead of the state's value! When I print the log of user.getters, it does list the functions.