how to avoid .value from return value of a composable
here i have a composable
export const useUser = () => {
const { status, data } = useAuth();
const { $store } = useNuxtApp();
const user = computed(() => $store.state.user);
return {
loggedIn: computed(() => status.value === "authenticated"),
user,
};
};
for using it,
i have to always type loggedIn.value
how to use it just as loggedIn ?
export const useUser = () => {
const { status, data } = useAuth();
const { $store } = useNuxtApp();
const user = computed(() => $store.state.user);
return {
loggedIn: computed(() => status.value === "authenticated"),
user,
};
};
for using it,
i have to always type loggedIn.value
how to use it just as loggedIn ?
