solid-db

Provide SolidJS bindings for TanStack DB live queries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SolidJS applications often struggle to integrate with TanStack DB in a reactive way. This Skill provides SolidJS bindings for TanStack DB to enable live, reactive data queries and state management within components.

Core Features & Use Cases

  • Reactive live queries via useLiveQuery that return an accessor to data and include status information.
  • Seamless re-exports from TanStack DB, enabling familiar APIs within Solid apps.
  • Built-in Suspense-compatible loading patterns and real-time UI updates for dynamic data apps.
  • Use cases include building dashboards, live lists, and reactive forms that reflect database changes in real time.

Quick Start

Import the useLiveQuery hook from @tanstack/solid-db and create a simple live query against a collection.

Frequently Asked Questions about solid-db

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

FAQPage Schema
How do I enable real-time reactive data queries in a SolidJS application?

To enable real-time reactive data queries in SolidJS, use the useLiveQuery hook from solid-db. It returns an accessor to data with status information, automatically updating the UI whenever the underlying database collection changes.

Can I use TanStack DB with SolidJS for live UI updates?

Yes, you can use TanStack DB with SolidJS for live UI updates. The solid-db bindings re-export TanStack DB APIs and provide the useLiveQuery hook to synchronize reactive data directly within Solid components.

Does solid-db support Suspense-compatible loading patterns for dynamic data apps?

Yes, solid-db supports Suspense-compatible loading patterns for dynamic data apps. It integrates with Solid's Suspense boundaries to handle asynchronous data fetching while providing real-time updates through live queries.

What is the best way to build a live dashboard with synchronized data in SolidJS?

The best way to build a live dashboard in SolidJS is using solid-db's useLiveQuery hook. It provides reactive, real-time data access, ensuring components reflect database changes instantly without manual state management.

How do I query a TanStack DB collection reactively in Solid?

To query a TanStack DB collection reactively in Solid, import the useLiveQuery hook from @tanstack/solid-db. This creates a live query that returns an accessor to the collection data, enabling real-time synchronization across components.

Are there limitations when using solid-db for reactive SolidJS state management?

solid-db is specifically designed for integrating TanStack DB into Solid apps for live data access. It is not a general state management solution, but rather focuses on real-time UI responses and synchronizing database changes reactively.