I have a problem with setting a cookie from the mixin.
I have a mixin with methods
setCookie
and getCookie
, and when used in methods, then they work fine, but when I try to render them in template e.g
<div>
<p>{{this.getCookie('test')}}</p>
...
it says document is undefined. I have also tried using computed
As I understand it is because of SSR, and I have found some publications on how to make plugins work without SSR, but nothing about mixins and cookies. Does anyone can help. Can anyone help please?
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c684">#c684</a>)</em></sub></div>