UseCookie has a nesting limit?
Hello, I'm trying to persist the store (pinia) but I was having trouble adding an object like this to the cookies:
https://api.jsonbin.io/v3/qs/637fb32c65b57a31e6c26bfb
However if I delete the array of users it creates the cookie normally, when not deleted it simply generates no error but also does not create the cookie.
(Note: I was doing it by hand, because all the existing persistence libraries weren't persisting, probably due to the same problem, after all they all use nuxt's composable.
2 Replies
Did you try https://github.com/prazdevs/pinia-plugin-persistedstate ?
That one works great for me to persist a store. Just make sure you add the
persist: true
to it:
Your JSONbin has expired.