tanstack-store

Provide a framework-agnostic reactive state management library for immutable stores with subscribe and setState APIs.

6|4|Updated Nov 1, 2025
One-click install
npx skills add https://github.com/Montte-erp/montte-nx --skill tanstack-store-montte-erp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-store
Source: https://github.com/Montte-erp/montte-nx/tree/main/.agents/skills/tanstack-store
Command: npx skills add https://github.com/Montte-erp/montte-nx --skill tanstack-store-montte-erp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TanStack Store removes complexity and unpredictable updates from UI state by providing a lightweight, immutable, reactive data store that works across frameworks so developers can build predictable, efficient stateful user interfaces.

Core Features & Use Cases

  • Reactive Stores: Create immutable Store instances with subscribe and setState APIs for predictable updates in single-page applications.
  • Computed & Effects: Use Derived for computed values and Effect for side effects with explicit mount/unmount lifecycles to manage subscriptions and cleanup.
  • Framework Integration: Use adapters for React, Vue, Solid, Angular, and Svelte to connect stores to component rendering with selectors and shallow equality to minimize re-renders.
  • Use Case: Implement module-level stores for counters, filtered/sorted/paginated lists, and cross-component shared state with batched updates to avoid redundant renders.

Quick Start

Create a Store for your state, derive a computed value with Derived, mount the Derived or Effect within your component lifecycle, and read or update state through setState to observe reactive updates.

Frequently Asked Questions about tanstack-store

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

FAQPage Schema
How do I manage immutable state across multiple frontend frameworks?

To manage immutable state across multiple frontend frameworks, you can use a framework-agnostic reactive store with adapters for React, Vue, Solid, Angular, and Svelte to connect stores to component rendering. This ensures predictable updates and minimizes re-renders using selectors and shallow equality.

How do I compute derived values and handle side effects in a reactive store?

To compute derived values and handle side effects in a reactive store, use Derived for computed values and Effect for side effects. Both feature explicit mount and unmount lifecycles to manage subscriptions and cleanup efficiently within your application.

What is the best way to batch state updates and prevent redundant UI re-renders?

The best way to batch state updates and prevent redundant UI re-renders is to use atomic batch grouping within a reactive store. Grouping updates atomically ensures that setState functional updaters trigger a single, predictable UI refresh instead of multiple redundant renders.

Does this reactive state management library work with Svelte and Solid?

Yes, this reactive state management library works with Svelte and Solid. It provides framework adapters for React, Vue, Solid, Angular, and Svelte, allowing you to connect immutable stores to component rendering with selector-based subscriptions across these platforms.

How do I subscribe to a specific slice of state without triggering unnecessary renders?

To subscribe to a specific slice of state without triggering unnecessary renders, use selector-based subscriptions with shallow equality. This approach ensures components only re-render when the selected immutable state slice actually changes, keeping updates predictable and efficient.

When should I not use a framework-agnostic reactive store for state management?

You should not use a framework-agnostic reactive store if your application relies heavily on framework-specific state conventions or mutable data models. This approach requires immutable updates and functional updaters, which may add unnecessary complexity to simple components.