vue-reactive-cookie
A Vue.js reactive cookie plugin
Install
You can install this plugin via yarn or via npm
$ yarn add vue-reactive-cookie$ npm install --save vue-reactive-cookie
Basic example
{{ message }} Forget the message
// Also, you could use es6 importconst VueReactiveCookie = ; Vue; el: '#element' computed: message: { return this$cookiesmessage || null; } { this; } methods: { this; } ;
Available methods
$setCookie(name, value, options)
Creates a cookie. The list of available options are here: github.com/js-cookie/js-cookie#cookie-attributes
$removeCookie(name)
Removes a cookie.