[Vuejs]-Computed value not updating in vue

0👍

Looks like auth.isUserLoggedIn() is not reactive, You can make it reactive by assigning its value to a reactive variable and then use that in your computed property. Can you give a try to this :

const loggedIn = ref(null)

const auth = useAuthMethod();

loggedIn.value = auth.isUserLoggedIn();

const isUserLoggedIn = computed(() => loggedIn.value)

Leave a comment