How to use composables
- Install the library:
shell
npm i @gun-vue/composables
- Import any of the functions you need:
js
import { useAccount } from "@gun-vue/composables";
- Instantiate the function inside your Vue SFC
js
const { account, auth, leave } = useAccount();
- Use the reactive state in your template to drive the component:
html
<div v-for="(data,field) in account.profile" :key="field">
{{ field }} - {{ data }}
</div>