Introduction to TanStack Store
TanStack Store is a framework-agnostic, type-safe data store that provides fine-grained reactivity and immutable state management. It serves as the foundation for state management across the TanStack ecosystem and can be used as a standalone library in any JavaScript application.What is TanStack Store?
TanStack Store is an immutable, reactive data store built on a powerful signals implementation. It provides:- Fine-grained updates for optimal rendering performance
- Framework adapters for React, Vue, Solid, Angular, Svelte, and Preact
- Type-safe API with full TypeScript support
- Lightweight core with minimal dependencies
- Flexible primitives for building custom state logic
TanStack Store is currently used to power the internals of many TanStack libraries, proving its reliability and performance at scale.
Key Features
Framework Agnostic
TanStack Store works across all major frameworks with dedicated adapters. Use the same store logic whether you’re building with React, Vue, Solid, or any other framework.Fine-Grained Reactivity
Components only re-render when the specific data they depend on changes. This fine-grained reactivity ensures optimal performance even in complex applications.Immutable State Management
All state updates create new immutable snapshots, making your application’s state predictable and easy to debug.Derived Stores
Create computed stores that automatically update when their dependencies change:What Problems Does It Solve?
Performance Bottlenecks
Traditional state management solutions often cause unnecessary re-renders. TanStack Store’s fine-grained reactivity ensures components only update when their specific dependencies change.Framework Lock-in
Build your state logic once and use it across different frameworks. Perfect for component libraries, shared utilities, or migrating between frameworks.Complex State Logic
With powerful primitives like derived stores, batched updates, and subscriptions, you can build sophisticated state management patterns without external dependencies.Type Safety
Full TypeScript support ensures your state management is type-safe from end to end, catching errors at compile time rather than runtime.Use Cases
Application State Management
Use TanStack Store as your primary state management solution for React, Vue, Solid, or any other framework.
Library Development
Build framework-agnostic libraries with reactive state that works seamlessly across all frameworks.
Micro-Frontends
Share state between micro-frontends built with different frameworks using a single store implementation.
How It Works
TanStack Store is built on a signals-based reactive system. When you create a store, it wraps your data in an atom that tracks dependencies and notifies subscribers when changes occur.Next Steps
Ready to get started? Check out our Quickstart Guide to build your first store in minutes.Installation
Install TanStack Store for your framework
Quickstart
Build your first store in 5 minutes