I kept trying and
import { computed } from 'vue';
import { useStore } from 'vuex';
const store = useStore();
const con = computed(() => store.getters.connected);
In this case connected is just a boolean but I also tried it with objects and it still works.
My template:
<template>
<h1>{{ con }}</h1>
</template>
And it works just fine.