vue-db

Bind TanStack DB to Vue 3 applications with reactive queries.

3.9k|254|Updated Mar 11, 2025
One-click install
npx skills add https://github.com/TanStack/db --skill vue-db
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-db
Source: https://github.com/TanStack/db/tree/main/packages/vue-db/skills/vue-db
Command: npx skills add https://github.com/TanStack/db --skill vue-db

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Vue 3 bindings for TanStack DB enable reactive data access in Vue apps by providing a declarative API to run queries and manage live data in components.

Core Features & Use Cases

  • Reactive queries via useLiveQuery to subscribe to database results in UI
  • Pre-created collections and Vue refs for seamless data wiring
  • Re-exports of core TanStack DB features through @tanstack/vue-db for simple integration
  • Vue-specific patterns like reactive dependencies and mutation flows in components

Quick Start

Create a Vue 3 component and use the useLiveQuery hook to subscribe to a todoCollection.

Frequently Asked Questions about vue-db

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use live queries for reactive data access in a Vue 3 component?

Live queries in a Vue 3 component use the useLiveQuery hook to subscribe to database results, providing reactive data access that automatically updates the UI when underlying data changes. This declarative API manages live data directly within components.

What is the best way to bind a reactive database layer to Vue 3 applications?

Binding a reactive database layer to Vue 3 is best achieved through dedicated Vue-specific patterns that re-export core database features. This approach provides a declarative API to run queries and wire Vue refs seamlessly into your data layer.

Can I use Vue refs to drive TanStack DB collections and queries?

Yes, you can use Vue refs to drive TanStack DB collections by wiring them directly into pre-created collections. This enables seamless data wiring and ensures your Vue 3 reactive dependencies automatically trigger live query updates.

Does TanStack DB support Vue 3 reactivity and mutation flows?

TanStack DB supports Vue 3 reactivity and mutation flows through its Vue-specific bindings. It re-exports core database features using the @tanstack/vue-db package to ensure native reactive dependencies integrate smoothly with live query subscriptions.

How do I set up a live-updating UI component using a todoCollection in Vue?

To set up a live-updating UI component, use the useLiveQuery hook in your Vue 3 component to subscribe directly to a pre-created todoCollection. This binds the collection results to the template, ensuring reactive updates when mutations occur.