-
Notifications
You must be signed in to change notification settings - Fork 123
Add framework overview page content #842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add framework overview page content #842
Conversation
Replace placeholder content with complete framework-specific documentation for all non-React adapters. Each overview includes: - Installation instructions - Basic usage with useLiveQuery (or injectLiveQuery for Angular) - Dependency arrays/reactive parameters documentation - Framework-specific code examples and best practices These pages follow the same structure as the React overview but are tailored to each framework's conventions and only document the useLiveQuery hook (the only hook currently available for these frameworks).
|
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
|
Size Change: 0 B Total Size: 86 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 3.34 kB ℹ️ View Unchanged
|
Correct the documentation based on actual source code and test verification: **Solid changes:** - Remove incorrect dependency array pattern - Document automatic fine-grained reactivity tracking - Show correct signal usage inside query functions - Add examples of good vs bad patterns - Explain that Solid tracks signals automatically without deps **Vue changes:** - Fix dependency array to pass refs directly, not wrapped in functions - Show correct pattern: [minAge] instead of [() => minAge] - Add toRef pattern for props - Clarify getter functions are only needed for non-ref values - Add example of using pre-created collections with reactive refs Both frameworks now match their actual implementations as verified against packages/*-db/src/*.ts source files and test files.
Address critical issues identified in external code review:
**Angular fixes:**
- Replace invalid destructuring syntax ({ data } = injectLiveQuery)
with correct field assignment (query = injectLiveQuery)
- Update all templates to call signals with () as per Angular API
- Add separate examples for Angular 16+ (@input) vs 17+ (input.required)
- Add note explaining all return values are Angular signals
- Ensure all examples use query.data() and query.isLoading()
**Svelte fixes:**
- Remove incorrect $ prefix from all examples (not Svelte stores)
- Change to const query = useLiveQuery() pattern
- Update all templates to use query.data and query.isLoading directly
- Add note explaining Svelte 5 runes return reactive values via getters
- Ensure consistency: query.data (no call), query.isLoading (no call)
These changes align documentation with actual adapter implementations
and fix syntax errors that would cause compile failures.
Apply precision improvements from external code review: **Angular:** - Soften parameter-change behavior wording to avoid over-promising timing guarantees (changed from "isLoading becomes true" to "status()/isLoading() reflect the new query's lifecycle") - Add template syntax version note explaining @if/@for requires Angular 17+ (v16 users should use *ngIf/*ngFor) **Solid:** - Fix contradictory intro sentence that claimed "all return values should be called as functions" while the note correctly stated "data is a plain array" - Now states clearly: "data is a plain array and status fields are accessors" All changes align documentation with exact adapter behavior and prevent user confusion about API contracts.
samwillis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Replace placeholder content with complete framework-specific documentation for all non-React adapters. Each overview includes:
These pages follow the same structure as the React overview but are tailored to each framework's conventions and only document the useLiveQuery hook (the only hook currently available for these frameworks).
🎯 Changes
✅ Checklist
pnpm test:pr.🚀 Release Impact