Skip to content

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

Open
wants to merge 25 commits into
base: development
Choose a base branch
from
Open

Feature/tanstack db #582

wants to merge 25 commits into from

Conversation

flipvh
Copy link
Contributor

@flipvh flipvh commented Aug 6, 2025

No description provided.

@@ -44,71 +45,112 @@ export const groupedAttachmentsQueryOptions = ({
});

//TODO (TanStackDB) make optimistic updates work offline
export const getAttachmentsCollection = (organizationId: string): Collection<LiveQueryAttachment> => {
export const getAttachmentsCollection = (
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants