
Angular Best Practices Tanstack
- 196 installs
- 37 repo stars
- Updated March 28, 2026
- alfredoperez/angular-best-practices
Implement Angular data tables, async queries, caching, and server-state patterns with TanStack Query and Table aligned to Angular best practices.
About
angular-best-practices-tanstack covers TanStack Query and Table usage in Angular apps: query keys, caching, pagination, sorting, and resilient async UI states. Use it when building dashboards or data-heavy SaaS screens that need predictable server-state management without reinventing fetch logic.
- TanStack Query caching in Angular
- Table virtualization and column patterns
- Server-state vs local-state boundaries
- Optimistic updates and error handling
- Typed async data flows
Angular Best Practices Tanstack by the numbers
- 196 all-time installs (skills.sh)
- Ranked #860 of 2,245 Frontend Development skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/alfredoperez/angular-best-practices --skill angular-best-practices-tanstackAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 196 |
|---|---|
| repo stars | ★ 37 |
| Last updated | March 28, 2026 |
| Repository | alfredoperez/angular-best-practices ↗ |
What it does
Implement Angular data tables, async queries, caching, and server-state patterns with TanStack Query and Table aligned to Angular best practices.
Files
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
Angular Tanstack Best Practices
Use with the core angular-best-practices skill.---
1. TanStack Query
Impact: HIGH (Server state)
1.1 Know When to Use TanStack Query
Impact: MEDIUM (Right tool for the job)
Use TanStack Query for server state (data from APIs); use signals for client state (UI state like form dirty, modal open).
Example:
// Server state → TanStack Query (caching, refetching)
users = injectQuery(() => ({ queryKey: ['users'], queryFn: fetchUsers }));
// Client state → Signals (no caching needed)
formDirty = signal(false);1.2 Use Query Key Factories
Impact: MEDIUM (Consistent invalidation, hierarchical keys)
Define query key factories for consistent key structure and easy hierarchical invalidation.
Example:
const userKeys = {
all: ['users'] as const,
detail: (id: string) => ['users', 'detail', id] as const,
};
// Invalidate all user queries: queryClient.invalidateQueries({ queryKey: userKeys.all })---