zustand-router-query

Coordinate React route data loading with Zustand and TanStack Query.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/vladimir-shirmanov/tenax --skill zustand-router-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zustand-router-query
Source: https://github.com/vladimir-shirmanov/tenax/tree/main/.github/skills/zustand-router-query
Command: npx skills add https://github.com/vladimir-shirmanov/tenax --skill zustand-router-query

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Decouple local UI state from server data and orchestrate route-driven data loading to improve predictability and performance in frontend applications.

Core Features & Use Cases

  • Use Zustand for client UI/state and TanStack Query for server data and mutations.
  • Leverage React Router framework mode loaders/actions to coordinate route-level data flows.
  • Define stable query keys and implement cache invalidation after mutations to keep UI consistent.

Quick Start

Configure Zustand for UI state, TanStack Query for data fetching, and React Router loaders to orchestrate route-level data flows.

Frequently Asked Questions about zustand-router-query

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

FAQPage Schema
How do I coordinate React Router loaders with TanStack Query and Zustand?

You can coordinate React Router loaders with TanStack Query and Zustand by using the router loaders to orchestrate route-level data flows, TanStack Query for server state, and Zustand for client UI state. This unifies UI state with route-driven data loading.

What is the best way to manage cache invalidation after mutations in React Router?

The best way to manage cache invalidation after mutations is to define stable query keys with TanStack Query and orchestrate them through React Router framework mode actions. This keeps UI state consistent after data changes.

Does this approach to route-driven data loading work with React Router framework mode?

Yes, this route-driven data loading approach works with React Router framework mode. It leverages framework mode loaders and actions to coordinate route-level data flows alongside Zustand and TanStack Query.

Why decouple local UI state from server data in React applications?

Decoupling local UI state from server data improves predictability and performance in frontend applications. It separates Zustand client state from TanStack Query server state to orchestrate route-aware data loading.

How do I define stable query keys for cache invalidation in TanStack Query?

You define stable query keys as part of orchestrating route-driven data loading with TanStack Query and React Router. Stable keys enable reliable cache invalidation after mutations to keep UI consistent.