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.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
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:
- Core skill: angular-best-practices
- This add-on: angular-best-practices-tanstack
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-03-11
- Index updated
- 2026-03-11
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!