Initial commit
This commit is contained in:
48
skills/tanstack-patterns/examples/INDEX.md
Normal file
48
skills/tanstack-patterns/examples/INDEX.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# TanStack Patterns Examples
|
||||
|
||||
Complete code examples for TanStack Start, Router, and Query.
|
||||
|
||||
## Available Examples
|
||||
|
||||
### [router-patterns.md](router-patterns.md)
|
||||
File-based routing, layouts, dynamic routes, and navigation.
|
||||
- Root layout with QueryClient
|
||||
- Protected route layouts with auth
|
||||
- Page routes with loaders
|
||||
- Dynamic routes with params
|
||||
- Type-safe navigation
|
||||
|
||||
### [query-patterns.md](query-patterns.md)
|
||||
Queries, mutations, infinite queries, and prefetching.
|
||||
- Query basics with Grey Haven defaults
|
||||
- Query key patterns (correct vs wrong)
|
||||
- Mutations with optimistic updates
|
||||
- Infinite queries for pagination
|
||||
- Prefetching for performance
|
||||
- Error handling
|
||||
|
||||
### [server-functions.md](server-functions.md)
|
||||
Creating and using TanStack Start server functions.
|
||||
- GET/POST/DELETE server functions
|
||||
- Using server functions in components
|
||||
- Auth context in server functions
|
||||
- Multi-tenant isolation patterns
|
||||
- RLS with server functions
|
||||
|
||||
### [advanced-patterns.md](advanced-patterns.md)
|
||||
Dependent queries, parallel queries, and custom hooks.
|
||||
- Dependent queries with `enabled`
|
||||
- Parallel queries for dashboards
|
||||
- Custom query hooks
|
||||
- Query composition
|
||||
- Background refetching
|
||||
- Suspense mode
|
||||
- Placeholders and initial data
|
||||
- Query cancellation
|
||||
|
||||
## Quick Navigation
|
||||
|
||||
**Need routing?** → [router-patterns.md](router-patterns.md)
|
||||
**Need data fetching?** → [query-patterns.md](query-patterns.md)
|
||||
**Need server-side code?** → [server-functions.md](server-functions.md)
|
||||
**Need advanced patterns?** → [advanced-patterns.md](advanced-patterns.md)
|
||||
Reference in New Issue
Block a user