nuxt / nuxt

The Intuitive Vue Framework.

Home Page:https://nuxt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useCookie not updating value in browser

martinszeltins opened this issue · comments

Environment

Stackblitz

------------------------------
- Operating System: Linux
- Node Version:     v18.18.0
- Nuxt Version:     3.11.2
- CLI Version:      3.11.1
- Nitro Version:    2.9.6
- Package Manager:  npm@10.2.3
- Builder:          -
- User Config:      devtools
- Runtime Modules:  -
- Build Modules:    -
------------------------------

Reproduction

https://stackblitz.com/edit/nuxt-starter-kkckgc?file=app.vue

Describe the bug

When using useCookie it updates the cookie ref itself but the change is not reflected in browser devtools as can be seen in the screenshot below.

And when calling refreshCookie() it takes the value that is in the browser (old value) even when the ref value is newer.

Screenshot:
image

Additional context

No response

Logs

No response