Vue-Gun
A plugin to make Gun integration with Vue easier.
Installation
npm install vue-gun --save
or yarn add vue-gun
.
Add the plugin:
;Vue;
Initialize Gun
You can either pass in a gun
instance fully initialized, or allow VueGun to initialize it for you:
;Vue;
Allow VueGun to handle initialization by passing in options:
;Vue;
Usage
Access the gun
instance with this.$gun
inside of your Vue instance and components.
For instance inside your component, you might have this:
{ this$gun; }