useCookie returns undefined
my useCookie here always returns undefined though the cookie is present

undefined in your case, even though the cookie is present. Let's explore these possibilities:undefined.useCookieuseCookieuseCookieuseCookieuseCookieonMountedrefreshCookiecookieStorenuxt.config.tssetCookieh3fetchUsersfetchUsersimport { refreshCookie } from '#app'
onMounted(() => {
fetchUsers()
refreshCookie('token')
console.log(useCookie('token').value)
})export default defineNuxtConfig({
experimental: {
cookieStore: true
}
})export default defineEventHandler(event => {
setCookie(event, 'token', 'your-token-value')
// ...
})