Closed jiv-e closed 7 years ago
I guess to render cookies or use them in template tags, since it doesn't appear to have global scope or what.
Why not import tiny-cookie directly to your component where needed like this?
<script>
import cookie from 'tiny-cookie'
export default {
name: 'my-component',
methods: {
setCookie() {
cookie.set('test', 'Hello world!', 1);
},
...
try {{cookie.get}}...
Ok! I get it now! It would be helpful to describe this use case in the README.
I find this project interesting. Can you explain why not to use tiny-cookie directly? What are the benefits of using Vue plugin?
It would be great if the answers could be added to the README.