-
Notifications
You must be signed in to change notification settings - Fork 40
Feature/tanstack db #582
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: development
Are you sure you want to change the base?
Feature/tanstack db #582
Conversation
…eature/tanstack-db
@@ -44,71 +45,112 @@ export const groupedAttachmentsQueryOptions = ({ | |||
}); | |||
|
|||
//TODO (TanStackDB) make optimistic updates work offline | |||
export const getAttachmentsCollection = (organizationId: string): Collection<LiveQueryAttachment> => { | |||
export const getAttachmentsCollection = ( |
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.
If create mutations through createTransaction
( to be able create hook for offline updates) get same err in usage of raw
const attachmentsCollection = getAttachmentsCollection(orgIdOrSlug)
I must add attachmentsCollection.startImidietSync()
@@ -103,6 +112,18 @@ const BaseDataTable = memo( | |||
// Effect to update total and selected rows when data changes | |||
useEffect(() => setTotal(combined.length), [combined]); | |||
|
|||
//TODO (TanStackDB) make work with Strict mode |
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.
Can't make it work proper in dev with strict mode, mb there is the better way to abort on offline and unmount for colletion?
@@ -26,7 +26,7 @@ const BaseDataTable = memo( | |||
const attachmentCollection = getAttachmentsCollection(orgIdOrSlug); | |||
const localAttachmentCollection = getLocalAttachmentsCollection(orgIdOrSlug); | |||
|
|||
//TODO (TanStackDB) reduse re-renders will fix (ERR_INSUFFICIENT_RESOURCES) | |||
//TODO (TanStackDB) Add drop of sync on component unmount |
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.
Re-renders re-trigger live query with sync, causes a lot of query fire up at the same time on initial load
No description provided.