Closed xyshell closed 3 years ago
I'm having the same issue :(
Try to use this, it works
import { VueCookieNext as $cookie } from 'vue-cookie-next'
$cookie.setCookie('frontend', 'lalala')
<script lang="ts">
import { defineComponent, reactive, onMounted } from 'vue'
import { VueCookieNext as $cookie } from 'vue-cookie-next'
export default defineComponent({
name: 'develope',
setup() {
onMounted(() => {
$cookie.setCookie('frontend', 'lalala')
})
}
})
</script>
this should be fixed in (https://github.com/anish2690/vue-cookie-next/pull/5)
Hi guys,
I'm using Vue3 and vue-cookie-next's this.$cookie in mounted() as the README says. But typescript throws me
Failed to compile
error. But the console prints everything just fine.I tried to set
"strict": false
in thetsconfig.json
and then everything works fine. Anyone knows what's happening here?