Vue adapter for Lunora — live composables, optimistic mutations, and reactive loaders
[![typescript-image][typescript-badge]][typescript-url]
[![FSL-1.1-Apache-2.0 licence][license-badge]][license]
[![npm version][npm-version-badge]][npm-version]
[![npm downloads][npm-downloads-badge]][npm-downloads]
[![PRs Welcome][prs-welcome-badge]][prs-welcome]
---
Daniel Bannert's open source work is supported by the community on GitHub Sponsors
---
The Vue adapter for Lunora. Thin, idiomatic glue over the framework-neutral `@lunora/client` (WebSocket transport, subscription registry, offline queue, delta-merge), re-expressed as Vue composables. Live queries and optimistic mutations behave like any other reactive source, with a `hydratePreloaded` handoff for SSR.
Part of the [Lunora](https://github.com/anolilab/lunora) framework — a type-safe, real-time backend on Cloudflare Workers + Durable Objects with a Vite-first DX.
## Install
```sh
npm install @lunora/vue
```
```sh
yarn add @lunora/vue
```
```sh
pnpm add @lunora/vue
```
## Usage
```ts
import { createApp } from "vue";
import { LunoraClient } from "@lunora/client";
import { createLunora, useQuery, useMutation } from "@lunora/vue";
import { api } from "./lunora/_generated/api";
import App from "./App.vue";
// Provide the client once at the app root.
const client = new LunoraClient({ url: "https://app.acme.test" });
createApp(App).use(createLunora(client)).mount("#app");
// Inside a component's