@loomup/vue
v0.1.28
Published
Vue 3 composables and plugin for Loomup Realtime
Downloads
1,418
Readme
@loomup/vue
Vue 3 plugin and composables for Loomup, built on @loomup/client.
npm install @loomup/client @loomup/vueimport { createApp } from "vue";
import { createClient } from "@loomup/client";
import { LoomupPlugin, useAuth, useLiveQuery } from "@loomup/vue";
import App from "./App.vue";
const client = createClient({ url: "http://127.0.0.1:3000" });
const app = createApp(App);
app.use(LoomupPlugin, { client, persist: { enabled: true } });
app.mount("#app");<script setup lang="ts">
import { useAuth, useLiveQuery } from "@loomup/vue";
const { user, signIn } = useAuth();
const { data } = useLiveQuery("todos", { strategy: "merge" });
</script>Full documentation: tryloomup.com/docs.
npm install && npm test && npm run build