tanstack-store

Implement immutable reactive state management with TanStack store primitives.

Updated Jul 2, 2025
One-click install
npx skills add https://github.com/janpeterd/dotfiles --skill tanstack-store-janpeterd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-store
Source: https://github.com/janpeterd/dotfiles/tree/main/dot_agents/skills/tanstack-store
Command: npx skills add https://github.com/janpeterd/dotfiles --skill tanstack-store-janpeterd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you implement immutable, reactive application state management with clean primitives for updates, derived computations, and side effects across multiple UI frameworks.

Core Features & Use Cases

  • Reactive state primitives: Create Store for state, Derived for computed values, and Effect for reactive side effects with optional cleanup.
  • Framework-agnostic adapters: Use framework-specific hooks/composables (React/Vue/Solid/Angular/Svelte) to bind store values to the UI efficiently.
  • Atomic updates and composition: Use batch for coordinated updates and chain Derived to build transformations like filter → sort → paginate.
  • Use Case: Maintain a central state (e.g., a list + user-selected filters) and derive filtered/sorted/paginated views that update automatically in the UI.

Quick Start

Install the required packages, create a Store with initial state, and mount any Derived or Effect instances to activate reactivity.

Frequently Asked Questions about tanstack-store

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

FAQPage Schema
How do I manage reactive state across multiple UI frameworks like React and Vue?

Reactive state management across React and Vue uses framework-agnostic store primitives with specific adapters to bind values to the UI. You create a central Store and use corresponding hooks or composables for React, Vue, Solid, Angular, or Svelte to ensure automatic UI updates.

How do I build derived computations like filter and sort pipelines for reactive state?

Building derived computations for reactive state involves chaining Derived instances to create transformations like filter, sort, and paginate. You mount these instances to activate reactivity, ensuring computed values update automatically when the underlying central Store data changes.

What is batch used for in immutable state updates?

Batch in immutable state updates groups multiple Store modifications together for atomic updates and coordinated compositions. This ensures derived computations and UI renders trigger only once after the batch completes, preventing intermediate inconsistent states.

Can I handle reactive side effects and lifecycle cleanup with signals-like stores?

Handling reactive side effects with signals-like stores uses the Effect primitive, which supports optional lifecycle cleanup. You mount the Effect instance to activate reactivity, allowing it to execute side effects and run cleanup functions when dependencies change or the instance unmounts.

Does TanStack Store work without a specific UI framework?

TanStack Store works without a specific UI framework by providing framework-agnostic immutable reactive state primitives. Core Store, Derived, Effect, and batch functionalities operate independently, while framework adapters are optionally available for binding to React, Vue, Solid, Angular, and Svelte.

When should I not use a signals-like store for app-level data?

A signals-like store for app-level data is not suited for scenarios requiring heavy relational data persistence or complex schema validation. It targets reactive application state, derived views, and lifecycle side effects, rather than serving as a full database replacement.