Skip to main content

Installation

Get started with Solid Query by installing the package and setting up your application.

Prerequisites

Solid Query requires SolidJS 1.6.0 or higher.

Package Installation

Solid Query follows semantic versioning. The current version is 5.90.23.

Basic Setup

After installation, set up the QueryClientProvider in your application root:

Configuration Options

Customize the QueryClient with default options:

Common Configuration Options

These are the most commonly used configuration options. See the full API reference for all available options.

Server-Side Rendering Setup

For SSR applications, create a new QueryClient instance per request:
Always create a new QueryClient instance for each request in SSR to prevent data leaking between users.

DevTools Installation (Optional)

Install the DevTools package for development debugging:
Add the DevTools component to your app:
DevTools are automatically excluded from production builds when using the default configuration.

TypeScript Setup

Solid Query is written in TypeScript and provides full type safety out of the box. No additional configuration is needed, but you can enhance type inference:

Bundle Size

Solid Query is designed to be lightweight:
  • @tanstack/solid-query: ~15kb min+gzip
  • @tanstack/solid-query-devtools: ~25kb min+gzip (dev only)
The exact bundle size depends on your bundler and tree-shaking configuration. The package is fully tree-shakeable.

Version Compatibility

Solid Query is tested against multiple TypeScript versions:
  • TypeScript 5.0+
  • TypeScript 5.1+
  • TypeScript 5.2+
  • TypeScript 5.3+
  • TypeScript 5.4+
  • TypeScript 5.5+
  • TypeScript 5.6+
  • TypeScript 5.7+ (latest)

Next Steps

Quick Start

Build your first application with Solid Query

Overview

Learn about core concepts and features