AGENT SKILL

angular-best-practices-tanstack

TanStack Query best practices for Angular. Covers query/mutation patterns, cache invalidation, and query key factories for server state management. Activates when working with @tanstack/angular-query-experimental. Do not use for NgRx Effects, manual HTTP caching, or RxJS-based server state. Install alongside angular-best-practices for full coverage.

License 许可
MIT
最近更新
2026-10-14
Stars
★ 0
Forks
0

01 前言 Front Matter

name
angular-best-practices-tanstack
tags
[ "angular", "tanstack-query", "server-state", "caching" ]
globs
[ "**/*.ts", "**/*.service.ts" ]
license
MIT
metadata
{ "author": "alfredoperez", "version": "1.2.0" }
description
TanStack Query best practices for Angular. Covers query/mutation patterns, cache invalidation, and query key factories for server state management. Activates when working with @tanstack/angular-query-experimental. Do not use for NgRx Effects, manual HTTP caching, or RxJS-based server state. Install alongside angular-best-practices for full coverage.

02 资源文件 1

03 SKILL.md 正文

Angular TanStack Query Best Practices

TanStack Query rules for server state with automatic caching, deduplication, and background refetching. Use with the core angular-best-practices skill for comprehensive Angular coverage.

Links

When to Apply

  • Fetching data from APIs with injectQuery
  • Performing mutations with cache invalidation
  • Structuring query keys for hierarchical invalidation

Rules

Rule Impact Description
Know When to Use TanStack Query MEDIUM Server state (APIs) vs client state (signals)
Use Query Key Factories MEDIUM Consistent key structure for hierarchical invalidation

Install

Install from skills.sh/alfredoperez/angular-best-practices:

04 同仓库更多 Skills